File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -344,14 +344,18 @@ it returns the value of `SOURCE' as it is."
344
344
(defun phpstan-analyze-project ()
345
345
" Analyze a PHP project using PHPStan."
346
346
(interactive )
347
- (compile (mapconcat #'shell-quote-argument (phpstan-get-command-args :include-executable t ) " " )))
347
+ (let ((default-directory (or (php-project-get-root-dir) default-directory)))
348
+ (compile (mapconcat #'shell-quote-argument (phpstan-get-command-args :include-executable t ) " " ))))
348
349
349
350
;;;### autoload
350
351
(defun phpstan-generate-baseline ()
351
352
" Generate PHPStan baseline file."
352
353
(interactive )
353
- (compile (mapconcat #'shell-quote-argument
354
- (phpstan-get-command-args :include-executable t :options '(" --generate-baseline" )) " " )))
354
+ (let ((default-directory (or (locate-dominating-file default-directory phpstan-baseline-file)
355
+ (php-project-get-root-dir)
356
+ default-directory)))
357
+ (compile (mapconcat #'shell-quote-argument
358
+ (phpstan-get-command-args :include-executable t :options '(" --generate-baseline" )) " " ))))
355
359
356
360
;;;### autoload
357
361
(defun phpstan-find-baseline-file ()
You can’t perform that action at this time.
0 commit comments