Skip to content

Commit a8844b9

Browse files
committed
Support using rule level specified in configuration file
1 parent e8d33c7 commit a8844b9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

phpstan.el

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ INTEGER or STRING
120120
Number of PHPStan rule level.
121121
122122
max
123-
The highest of PHPStan rule level.")
123+
The highest of PHPStan rule level.
124+
125+
NIL
126+
Use rule level specified in `phpstan' configuration file.")
124127
(make-variable-buffer-local 'phpstan-level)
125128
(put 'phpstan-level 'safe-local-variable
126129
#'(lambda (v) (or (null v)
@@ -210,7 +213,7 @@ it returns the value of `SOURCE' as it is."
210213
(defun phpstan-get-level ()
211214
"Return path to phpstan configure file or `NIL'."
212215
(cond
213-
((null phpstan-level) "0")
216+
((null phpstan-level) nil)
214217
((integerp phpstan-level) (int-to-string phpstan-level))
215218
((symbolp phpstan-level) (symbol-name phpstan-level))
216219
(t phpstan-level)))

0 commit comments

Comments
 (0)