Skip to content

Commit fb5a489

Browse files
committed
Use cl-defun php-stan-get-command-args instead of defun
1 parent 2200791 commit fb5a489

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

phpstan.el

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,13 +290,15 @@ it returns the value of `SOURCE' as it is."
290290
(interactive)
291291
(let ((file (expand-file-name (or buffer-file-name
292292
(read-file-name "Choose a PHP script: ")))))
293-
(compile (mapconcat #'shell-quote-argument (append (phpstan-get-command-args t) (list file)) " "))))
293+
(compile (mapconcat #'shell-quote-argument
294+
(append (phpstan-get-command-args :include-executable t) (list file)) " "))))
294295

295296
;;;###autoload
296297
(defun phpstan-analyze-file (file)
297298
"Analyze a PHP script FILE using PHPStan."
298299
(interactive (list (expand-file-name (read-file-name "Choose a PHP script: "))))
299-
(compile (mapconcat #'shell-quote-argument (append (phpstan-get-command-args t) (list file)) " ")))
300+
(compile (mapconcat #'shell-quote-argument
301+
(append (phpstan-get-command-args :include-executable t) (list file)) " ")))
300302

301303
(defun phpstan-get-executable-and-args ()
302304
"Return PHPStan excutable file and arguments."
@@ -335,7 +337,7 @@ it returns the value of `SOURCE' as it is."
335337
((executable-find "phpstan") (list (executable-find "phpstan")))
336338
(t (error "PHPStan executable not found")))))))
337339

338-
(defun phpstan-get-command-args (&optional include-executable)
340+
(cl-defun phpstan-get-command-args (&key include-executable use-pro)
339341
"Return command line argument for PHPStan."
340342
(let ((executable-and-args (phpstan-get-executable-and-args))
341343
(path (phpstan-normalize-path (phpstan-get-config-file)))

0 commit comments

Comments
 (0)