| @@ 213-222 (lines=10) @@ | ||
| 210 | $prevLine = $tokens[$i]['line']; |
|
| 211 | }//end if |
|
| 212 | ||
| 213 | if ($tokens[$i]['code'] === T_STRING) { |
|
| 214 | $next = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), null, true); |
|
| 215 | if ($tokens[$next]['code'] === T_OPEN_PARENTHESIS) { |
|
| 216 | // This is a function call, so skip to the end as they |
|
| 217 | // have their own indentation rules. |
|
| 218 | $i = $tokens[$next]['parenthesis_closer']; |
|
| 219 | $prevLine = $tokens[$i]['line']; |
|
| 220 | continue; |
|
| 221 | } |
|
| 222 | } |
|
| 223 | }//end for |
|
| 224 | ||
| 225 | // From here on, we are checking the spacing of the opening and closing |
|
| @@ 154-166 (lines=13) @@ | ||
| 151 | } while (isset($tokens[$nextToken]['scope_closer']) === true); |
|
| 152 | }//end if |
|
| 153 | ||
| 154 | if ($startCondition['code'] === T_TRY) { |
|
| 155 | // TRY statements need to check until the end of all CATCH statements. |
|
| 156 | do { |
|
| 157 | $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); |
|
| 158 | if ($tokens[$nextToken]['code'] === T_CATCH) { |
|
| 159 | // The end brace becomes the CATCH's end brace. |
|
| 160 | $stackPtr = $tokens[$nextToken]['scope_closer']; |
|
| 161 | $endBrace = $tokens[$stackPtr]; |
|
| 162 | } else { |
|
| 163 | break; |
|
| 164 | } |
|
| 165 | } while (isset($tokens[$nextToken]['scope_closer']) === true); |
|
| 166 | } |
|
| 167 | ||
| 168 | $lineDifference = ($endBrace['line'] - $startBrace['line']); |
|
| 169 | ||