Skip to content

Commit 5f775c9

Browse files
committed
fix enabled-and-set-variable predicate
phpstan-executable is valid if it like as below format - STRING - `docker' - `(root . STRING)' - `(STRING . (ARGUMENTS ...))' - NIL
1 parent e675cf0 commit 5f775c9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

flycheck-phpstan.el

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,13 @@
5151
(when (and phpstan-flycheck-auto-set-executable
5252
(not (and (boundp 'flycheck-phpstan-executable)
5353
(symbol-value 'flycheck-phpstan-executable)))
54-
(or (eq 'docker phpstan-executable)
55-
(and (consp phpstan-executable)
56-
(stringp (car phpstan-executable))
57-
(listp (cdr phpstan-executable)))))
54+
(or (stringp phpstan-executable)
55+
(eq 'docker phpstan-executable)
56+
(and (eq 'root (car-safe phpstan-executable))
57+
(stringp (cdr-safe phpstan-executable)))
58+
(and (stirngp (car-safe phpstan-executable))
59+
(listp (cdr-safe phpstan-executable)))
60+
(null phpstan-executable)))
5861
(set (make-local-variable 'flycheck-phpstan-executable)
5962
(if (eq 'docker phpstan-executable)
6063
phpstan-docker-executable

0 commit comments

Comments
 (0)