Commit ba2f368
committed
Mark some methods as as impure for PHPStan
By default, PHPSTan considers assumes that all methods that return a
value are pure, meaning they have no side effects.
While we could configure PHPStan so it is consistent with Psalm, we do
not know how downstream projects are configured and should assume they
rely on the default behavior.
See https://phpstan.org/blog/remembering-and-forgetting-returned-values
Both moveNext() and glimpse() have side effects in that they modify
properties, and are therefore marked as impure.1 parent 84a527d commit ba2f368
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
| |||
220 | 221 | | |
221 | 222 | | |
222 | 223 | | |
| 224 | + | |
| 225 | + | |
223 | 226 | | |
224 | 227 | | |
225 | 228 | | |
| |||
0 commit comments