Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions flycheck-phpstan.el
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,15 @@
(let ((enabled (phpstan-enabled)))
(prog1 enabled
(when (and phpstan-flycheck-auto-set-executable
(not (and (boundp 'flycheck-phpstan-executable)
(symbol-value 'flycheck-phpstan-executable)))
(null (bound-and-true-p flycheck-phpstan-executable))
(or (stringp phpstan-executable)
(eq 'docker phpstan-executable)
(and (eq 'root (car-safe phpstan-executable))
(stringp (cdr-safe phpstan-executable)))
(and (stringp (car-safe phpstan-executable))
(listp (cdr-safe phpstan-executable)))
(null phpstan-executable)))
(set (make-local-variable 'flycheck-phpstan-executable)
(cond
((eq 'docker phpstan-executable) phpstan-docker-executable)
((stringp phpstan-executable) phpstan-executable)
(t (car phpstan-executable))))))))
(setq-local flycheck-phpstan-executable (nth 0 (phpstan-get-executable)))))))

(flycheck-define-checker phpstan
"PHP static analyzer based on PHPStan."
Expand Down