Commit ab4bae2
Generic/EmptyPHPStatement: remove some unreachable code
* Removed two unreachable conditions.
`$prevNonEmpty` will never be `false` as there will always be
at least a PHP open tag token before the semicolon token.
* Removed unreachable default case
`$tokens[$stackPtr]['type']` will always be either `T_SEMICOLON` or
`T_CLOSE_TAG` as those are the two tokens that this sniff listens for.
So, the default case will never be reached.1 parent 609ac10 commit ab4bae2
File tree
1 file changed
+2
-11
lines changed- src/Standards/Generic/Sniffs/CodeAnalysis
1 file changed
+2
-11
lines changedLines changed: 2 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 56 | | |
61 | 57 | | |
62 | 58 | | |
| |||
128 | 124 | | |
129 | 125 | | |
130 | 126 | | |
131 | | - | |
132 | | - | |
133 | | - | |
| 127 | + | |
| 128 | + | |
134 | 129 | | |
135 | 130 | | |
136 | 131 | | |
| |||
150 | 145 | | |
151 | 146 | | |
152 | 147 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | 148 | | |
158 | 149 | | |
159 | 150 | | |
| |||
0 commit comments