Skip to content

Commit 91e0e0e

Browse files
committed
Add phpstan-analyze-file
1 parent 2f715a1 commit 91e0e0e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

phpstan.el

+5
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,11 @@ it returns the value of `SOURCE' as it is."
259259
((symbolp phpstan-level) (symbol-name phpstan-level))
260260
(t phpstan-level)))
261261

262+
(defun phpstan-analyze-file (file)
263+
"Analyze a PHPScript FILE using PHPStan."
264+
(interactive "fChoose a PHP script: ")
265+
(compile (mapconcat #'shell-quote-argument (append (phpstan-get-command-args) (list file)) " ")))
266+
262267
(defun phpstan-get-executable ()
263268
"Return PHPStan excutable file and arguments."
264269
(cond

0 commit comments

Comments
 (0)