| @@ 134-140 (lines=7) @@ | ||
| 131 | } |
|
| 132 | ||
| 133 | $line = $tokens[$i]['line']; |
|
| 134 | if ($line > $lastLine) { |
|
| 135 | $type = substr($tokens[$stackPtr]['type'], 2); |
|
| 136 | $warning = 'Code after %s statement cannot be executed'; |
|
| 137 | $data = array($type); |
|
| 138 | $phpcsFile->addWarning($warning, $i, 'Unreachable', $data); |
|
| 139 | $lastLine = $line; |
|
| 140 | } |
|
| 141 | } |
|
| 142 | }//end if |
|
| 143 | ||
| @@ 258-264 (lines=7) @@ | ||
| 255 | } |
|
| 256 | ||
| 257 | $line = $tokens[$i]['line']; |
|
| 258 | if ($line > $lastLine) { |
|
| 259 | $type = substr($tokens[$stackPtr]['type'], 2); |
|
| 260 | $warning = 'Code after %s statement cannot be executed'; |
|
| 261 | $data = array($type); |
|
| 262 | $phpcsFile->addWarning($warning, $i, 'Unreachable', $data); |
|
| 263 | $lastLine = $line; |
|
| 264 | } |
|
| 265 | }//end for |
|
| 266 | ||
| 267 | }//end process() |
|