@@ -359,14 +359,14 @@ it returns the value of `SOURCE' as it is."
359
359
(let ((file (phpstan--expand-file-name (or buffer-file-name
360
360
(read-file-name " Choose a PHP script: " )))))
361
361
(compile (mapconcat #'shell-quote-argument
362
- (phpstan-get-command-args :include-executable t :args (list file)) " " ))))
362
+ (phpstan-get-command-args :include-executable t :args (list file) :verbose 1 ) " " ))))
363
363
364
364
;;;### autoload
365
365
(defun phpstan-analyze-file (file )
366
366
" Analyze a PHP script FILE using PHPStan."
367
367
(interactive (list (phpstan--expand-file-name (read-file-name " Choose a PHP script: " ))))
368
368
(compile (mapconcat #'shell-quote-argument
369
- (phpstan-get-command-args :include-executable t :args (list file)) " " )))
369
+ (phpstan-get-command-args :include-executable t :args (list file) :verbose 1 ) " " )))
370
370
371
371
;;;### autoload
372
372
(defun phpstan-analyze-project ()
@@ -440,7 +440,7 @@ it returns the value of `SOURCE' as it is."
440
440
((executable-find " phpstan" ) (list (executable-find " phpstan" )))
441
441
(t (error " PHPStan executable not found " )))))))
442
442
443
- (cl-defun phpstan-get-command-args (&key include-executable use-pro args format options config )
443
+ (cl-defun phpstan-get-command-args (&key include-executable use-pro args format options config verbose )
444
444
" Return command line argument for PHPStan."
445
445
(let ((executable-and-args (phpstan-get-executable-and-args))
446
446
(config (or config (phpstan-normalize-path (phpstan-get-config-file))))
@@ -457,6 +457,12 @@ it returns the value of `SOURCE' as it is."
457
457
(and autoload (list " -a" autoload))
458
458
(and memory-limit (list " --memory-limit" memory-limit))
459
459
(and level (list " -l" level))
460
+ (cond
461
+ ((null verbose) nil )
462
+ ((memq verbose '(1 t )) (list " -v" ))
463
+ ((eq verbose 2 ) (list " -vv" ))
464
+ ((eq verbose 3 ) (list " -vvv" ))
465
+ (error " :verbose option should be 1, 2, 3 or `t' " ))
460
466
(cond
461
467
(phpstan--use-xdebug-option (list phpstan--use-xdebug-option))
462
468
((eq phpstan-use-xdebug-option 'auto )
0 commit comments