File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 4646
4747(defun flycheck-phpstan--enabled-and-set-variable ()
4848 " Return path to phpstan configure file, and set buffer execute in side effect."
49- (let ((enabled (and (phpstan-get-working-dir) (phpstan-get-config-file))))
49+ (let ((enabled (or (phpstan-get-working-dir) (phpstan-get-config-file))))
5050 (prog1 enabled
5151 (when (and phpstan-flycheck-auto-set-executable
5252 (not (and (boundp 'flycheck-phpstan-executable )
Original file line number Diff line number Diff line change @@ -181,10 +181,12 @@ NIL
181181 (expand-file-name (cdr phpstan-config-file) (php-project-get-root-dir))
182182 phpstan-config-file)
183183 (let ((working-directory (phpstan-get-working-dir)))
184- (cl-loop for name in '(" phpstan.neon" " phpstan.neon.dist" )
185- for dir = (locate-dominating-file working-directory name)
186- if dir
187- return (expand-file-name name dir)))))
184+ (if working-directory
185+ nil
186+ (cl-loop for name in '(" phpstan.neon" " phpstan.neon.dist" )
187+ for dir = (locate-dominating-file working-directory name)
188+ if dir
189+ return (expand-file-name name dir))))))
188190
189191(defun phpstan-normalize-path (source-original &optional source )
190192 " Return normalized source file path to pass by `SOURCE-ORIGINAL' OR `SOURCE' .
You can’t perform that action at this time.
0 commit comments