File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 1+ # Changelog
2+
3+ All notable changes of the phpactor.el are documented in this file using the [ Keep a Changelog] ( https://keepachangelog.com/ ) principles.
4+
5+ ## Unreleased
6+
7+ ### Added
8+
9+ * Add ` phpstan-analyze-this-file ` command
Original file line number Diff line number Diff line change @@ -283,8 +283,15 @@ it returns the value of `SOURCE' as it is."
283283 " Return --memory-limit value."
284284 phpstan-memory-limit)
285285
286+ (defun phpstan-analyze-this-file ()
287+ " Analyze current buffer-file using PHPStan."
288+ (interactive )
289+ (let ((file (expand-file-name (or buffer-file-name
290+ (read-file-name " Choose a PHP script: " )))))
291+ (compile (mapconcat #'shell-quote-argument (append (phpstan-get-command-args t ) (list file)) " " ))))
292+
286293(defun phpstan-analyze-file (file )
287- " Analyze a PHPScript FILE using PHPStan."
294+ " Analyze a PHP script FILE using PHPStan."
288295 (interactive (list (expand-file-name (read-file-name " Choose a PHP script: " ))))
289296 (compile (mapconcat #'shell-quote-argument (append (phpstan-get-command-args t ) (list file)) " " )))
290297
You can’t perform that action at this time.
0 commit comments