Skip to content

Commit fa5a892

Browse files
committed
Fix flycheck-phpstan
1 parent 5137a2f commit fa5a892

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

flycheck-phpstan.el

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
"Return path to phpstan configure file, and set buffer execute in side effect."
4949
(let ((enabled (phpstan-enabled)))
5050
(prog1 enabled
51-
(when (and phpstan-flycheck-auto-set-executable
51+
(when (and enabled
52+
phpstan-flycheck-auto-set-executable
5253
(null (bound-and-true-p flycheck-phpstan-executable))
5354
(or (stringp phpstan-executable)
5455
(eq 'docker phpstan-executable)
@@ -57,11 +58,7 @@
5758
(and (stringp (car-safe phpstan-executable))
5859
(listp (cdr-safe phpstan-executable)))
5960
(null phpstan-executable)))
60-
(set (make-local-variable 'flycheck-phpstan-executable)
61-
(cond
62-
((eq 'docker phpstan-executable) phpstan-docker-executable)
63-
((stringp phpstan-executable) phpstan-executable)
64-
(t (car phpstan-executable))))))))
61+
(setq-local flycheck-phpstan-executable (car (phpstan-get-executable-and-options)))))))
6562

6663
(flycheck-define-checker phpstan
6764
"PHP static analyzer based on PHPStan."

0 commit comments

Comments
 (0)