Commit 99b253f
Generic/UpperCaseConstantName: false positives when constant name is "DEFINE"
This commit fixes false positives when the sniff encounters a constant
named "DEFINE". When looking for calls to `define()`, the code was
checking only if there was a non-empty token after `define`. Instead, it
should check if the next non-empty token after `define` is
`T_OPEN_PARENTHESIS`.1 parent e4a1c05 commit 99b253f
File tree
2 files changed
+3
-1
lines changed- src/Standards/Generic
- Sniffs/NamingConventions
- Tests/NamingConventions
2 files changed
+3
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
0 commit comments