129129 :safe #'stringp
130130 :group 'phpstan )
131131
132+ (defcustom phpstan-identifier-prefix " 🪪 "
133+ " Prefix of PHPStan error identifier."
134+ :type 'string
135+ :safe #'stringp
136+ :group 'phpstan )
137+
132138(defcustom phpstan-enable-remote-experimental nil
133139 " Enable PHPStan analysis remotely by TRAMP.
134140
@@ -359,14 +365,14 @@ it returns the value of `SOURCE' as it is."
359365 (let ((file (phpstan--expand-file-name (or buffer-file-name
360366 (read-file-name " Choose a PHP script: " )))))
361367 (compile (mapconcat #'shell-quote-argument
362- (phpstan-get-command-args :include-executable t :args (list file)) " " ))))
368+ (phpstan-get-command-args :include-executable t :args (list file) :verbose 1 ) " " ))))
363369
364370;;;### autoload
365371(defun phpstan-analyze-file (file )
366372 " Analyze a PHP script FILE using PHPStan."
367373 (interactive (list (phpstan--expand-file-name (read-file-name " Choose a PHP script: " ))))
368374 (compile (mapconcat #'shell-quote-argument
369- (phpstan-get-command-args :include-executable t :args (list file)) " " )))
375+ (phpstan-get-command-args :include-executable t :args (list file) :verbose 1 ) " " )))
370376
371377;;;### autoload
372378(defun phpstan-analyze-project ()
@@ -440,7 +446,7 @@ it returns the value of `SOURCE' as it is."
440446 ((executable-find " phpstan" ) (list (executable-find " phpstan" )))
441447 (t (error " PHPStan executable not found " )))))))
442448
443- (cl-defun phpstan-get-command-args (&key include-executable use-pro args format options config )
449+ (cl-defun phpstan-get-command-args (&key include-executable use-pro args format options config verbose )
444450 " Return command line argument for PHPStan."
445451 (let ((executable-and-args (phpstan-get-executable-and-args))
446452 (config (or config (phpstan-normalize-path (phpstan-get-config-file))))
@@ -457,6 +463,12 @@ it returns the value of `SOURCE' as it is."
457463 (and autoload (list " -a" autoload))
458464 (and memory-limit (list " --memory-limit" memory-limit))
459465 (and level (list " -l" level))
466+ (cond
467+ ((null verbose) nil )
468+ ((memq verbose '(1 t )) (list " -v" ))
469+ ((eq verbose 2 ) (list " -vv" ))
470+ ((eq verbose 3 ) (list " -vvv" ))
471+ (error " :verbose option should be 1, 2, 3 or `t' " ))
460472 (cond
461473 (phpstan--use-xdebug-option (list phpstan--use-xdebug-option))
462474 ((eq phpstan-use-xdebug-option 'auto )
0 commit comments