Skip to content

Commit dffcad7

Browse files
committed
Add 'max keyword to phpstan-level
1 parent 23d1860 commit dffcad7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

phpstan.el

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@
6464
(put 'phpstan-level 'safe-local-variable
6565
#'(lambda (v) (or (null v)
6666
(integerp v)
67+
(eq 'max v)
6768
(and (stringp v)
69+
(string= "max" v)
6870
(string-match-p "\\`[0-9]\\'" v))))))
6971

7072
;;;###autoload
@@ -158,6 +160,7 @@ it returns the value of `SOURCE' as it is."
158160
(cond
159161
((null phpstan-level) "0")
160162
((integerp phpstan-level) (int-to-string phpstan-level))
163+
((symbolp phpstan-level) (symbol-name phpstan-level))
161164
(t phpstan-level)))
162165

163166
(defun phpstan-get-executable ()

0 commit comments

Comments
 (0)