vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php 1 location
|
@@ 374-384 (lines=11) @@
|
| 371 |
|
$lastLine = $tokens[$i]['line']; |
| 372 |
|
}//end if |
| 373 |
|
|
| 374 |
|
if ($tokens[$i]['code'] === T_ARRAY || $tokens[$i]['code'] === T_OPEN_SHORT_ARRAY) { |
| 375 |
|
// Skip arrays as they have their own indentation rules. |
| 376 |
|
if ($tokens[$i]['code'] === T_OPEN_SHORT_ARRAY) { |
| 377 |
|
$i = $tokens[$i]['bracket_closer']; |
| 378 |
|
} else { |
| 379 |
|
$i = $tokens[$i]['parenthesis_closer']; |
| 380 |
|
} |
| 381 |
|
|
| 382 |
|
$lastLine = $tokens[$i]['line']; |
| 383 |
|
continue; |
| 384 |
|
} |
| 385 |
|
}//end for |
| 386 |
|
|
| 387 |
|
if (isset($tokens[$stackPtr]['scope_opener']) === false) { |
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php 1 location
|
@@ 379-386 (lines=8) @@
|
| 376 |
|
$lastToken = $nextToken; |
| 377 |
|
} |
| 378 |
|
|
| 379 |
|
if ($tokens[$nextToken]['code'] === T_ARRAY) { |
| 380 |
|
$nextToken = $tokens[$tokens[$nextToken]['parenthesis_opener']]['parenthesis_closer']; |
| 381 |
|
} else if ($tokens[$nextToken]['code'] === T_OPEN_SHORT_ARRAY) { |
| 382 |
|
$nextToken = $tokens[$nextToken]['bracket_closer']; |
| 383 |
|
} else { |
| 384 |
|
// T_CLOSURE. |
| 385 |
|
$nextToken = $tokens[$nextToken]['scope_closer']; |
| 386 |
|
} |
| 387 |
|
|
| 388 |
|
$nextToken = $phpcsFile->findNext(T_WHITESPACE, ($nextToken + 1), null, true); |
| 389 |
|
if ($tokens[$nextToken]['code'] !== T_COMMA) { |