Skip to content

Commit 97f6435

Browse files
kermorgantzonuexe
authored andcommitted
Fix evaluation order change and add character string check
GitHub-Issue: #7
1 parent d4271b2 commit 97f6435

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: phpstan.el

+2-1
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,15 @@ it returns the value of `SOURCE' as it is."
218218
(defun phpstan-get-executable ()
219219
"Return PHPStan excutable file and arguments."
220220
(cond
221-
((file-exists-p phpstan-executable) (list phpstan-executable))
222221
((eq 'docker phpstan-executable)
223222
(list "run" "--rm" "-v"
224223
(concat (expand-file-name (php-project-get-root-dir)) ":/app")
225224
"phpstan/phpstan"))
226225
((and (consp phpstan-executable)
227226
(eq 'root (car phpstan-executable)))
228227
(expand-file-name (cdr phpstan-executable) (php-project-get-root-dir)))
228+
((and (stringp phpstan-executable) (file-exists-p phpstan-executable))
229+
(list phpstan-executable))
229230
((and phpstan-flycheck-auto-set-executable
230231
(listp phpstan-executable)
231232
(stringp (car phpstan-executable))

0 commit comments

Comments
 (0)