| @@ 484-490 (lines=7) @@ | ||
| 481 | $indexEnd = $phpcsFile->findPrevious(T_WHITESPACE, ($nextToken - 1), $arrayStart, true); |
|
| 482 | $indexStart = $phpcsFile->findStartOfStatement($indexEnd); |
|
| 483 | ||
| 484 | if ($indexStart === $indexEnd) { |
|
| 485 | $currentEntry['index'] = $indexEnd; |
|
| 486 | $currentEntry['index_content'] = $tokens[$indexEnd]['content']; |
|
| 487 | } else { |
|
| 488 | $currentEntry['index'] = $indexStart; |
|
| 489 | $currentEntry['index_content'] = $phpcsFile->getTokensAsString($indexStart, ($indexEnd - $indexStart + 1)); |
|
| 490 | } |
|
| 491 | ||
| 492 | $indexLength = strlen($currentEntry['index_content']); |
|
| 493 | if ($maxLength < $indexLength) { |
|
| @@ 281-287 (lines=7) @@ | ||
| 278 | $indexEnd = $phpcsFile->findPrevious( T_WHITESPACE, ( $nextToken - 1 ), $arrayStart, true ); |
|
| 279 | $indexStart = $phpcsFile->findStartOfStatement( $indexEnd ); |
|
| 280 | ||
| 281 | if ( $indexStart === $indexEnd ) { |
|
| 282 | $currentEntry['index'] = $indexEnd; |
|
| 283 | $currentEntry['index_content'] = $tokens[ $indexEnd ]['content']; |
|
| 284 | } else { |
|
| 285 | $currentEntry['index'] = $indexStart; |
|
| 286 | $currentEntry['index_content'] = $phpcsFile->getTokensAsString( $indexStart, ( $indexEnd - $indexStart + 1 ) ); |
|
| 287 | } |
|
| 288 | ||
| 289 | $indexLength = strlen( $currentEntry['index_content'] ); |
|
| 290 | if ( $maxLength < $indexLength ) { |
|