| @@ 455-463 (lines=9) @@ | ||
| 452 | $cnt = 1; |
|
| 453 | while (($nextComma = $phpcsFile->findNext(array(T_COMMA, $tokens[$closer]['code'], T_OPEN_SHORT_ARRAY), $nextComma + 1, $closer + 1)) !== false) { |
|
| 454 | // Ignore anything within short array definition brackets. |
|
| 455 | if ($tokens[$nextComma]['type'] === 'T_OPEN_SHORT_ARRAY' |
|
| 456 | && (isset($tokens[$nextComma]['bracket_opener']) |
|
| 457 | && $tokens[$nextComma]['bracket_opener'] === $nextComma) |
|
| 458 | && isset($tokens[$nextComma]['bracket_closer']) |
|
| 459 | ) { |
|
| 460 | // Skip forward to the end of the short array definition. |
|
| 461 | $nextComma = $tokens[$nextComma]['bracket_closer']; |
|
| 462 | continue; |
|
| 463 | } |
|
| 464 | ||
| 465 | // Ignore comma's at a lower nesting level. |
|
| 466 | if ($tokens[$nextComma]['type'] === 'T_COMMA' |
|
| @@ 542-549 (lines=8) @@ | ||
| 539 | private function isRealEndOfDeclaration($tokens, $endPtr, $targetLevel) |
|
| 540 | { |
|
| 541 | // Ignore anything within short array definition brackets for now. |
|
| 542 | if ($tokens[$endPtr]['code'] === T_OPEN_SHORT_ARRAY |
|
| 543 | && (isset($tokens[$endPtr]['bracket_opener']) |
|
| 544 | && $tokens[$endPtr]['bracket_opener'] === $endPtr) |
|
| 545 | && isset($tokens[$endPtr]['bracket_closer']) |
|
| 546 | ) { |
|
| 547 | // Skip forward to the end of the short array definition. |
|
| 548 | return $tokens[$endPtr]['bracket_closer']; |
|
| 549 | } |
|
| 550 | ||
| 551 | // Skip past comma's at a lower nesting level. |
|
| 552 | if ($tokens[$endPtr]['code'] === T_COMMA) { |
|