Commit dfec1bb
Generic/UpperCaseConstantName:
This commit takes into account that `findNext()` may return `false` and
properly handles this case in the modified `if` condition. There were no
issues without this extra check, as when `$constPtr` is `false`,
`$tokens[$constPrt]` evaluates to the first token in the stack and the
first token can never be `T_CONSTANT_ENCAPSED_STRING`, so the sniff
would bail early anyway.findNext() may return false
1 parent 9d6d793 commit dfec1bb
File tree
2 files changed
+8
-1
lines changed- src/Standards/Generic
- Sniffs/NamingConventions
- Tests/NamingConventions
2 files changed
+8
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments