vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php 1 location
|
@@ 361-367 (lines=7) @@
|
| 358 |
|
// Find all the double arrows that reside in this scope. |
| 359 |
|
for ($nextToken = ($stackPtr + 1); $nextToken < $arrayEnd; $nextToken++) { |
| 360 |
|
// Skip bracketed statements, like function calls. |
| 361 |
|
if ($tokens[$nextToken]['code'] === T_OPEN_PARENTHESIS |
| 362 |
|
&& (isset($tokens[$nextToken]['parenthesis_owner']) === false |
| 363 |
|
|| $tokens[$nextToken]['parenthesis_owner'] !== $stackPtr) |
| 364 |
|
) { |
| 365 |
|
$nextToken = $tokens[$nextToken]['parenthesis_closer']; |
| 366 |
|
continue; |
| 367 |
|
} |
| 368 |
|
|
| 369 |
|
if ($tokens[$nextToken]['code'] === T_ARRAY |
| 370 |
|
|| $tokens[$nextToken]['code'] === T_OPEN_SHORT_ARRAY |
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php 1 location
|
@@ 93-100 (lines=8) @@
|
| 90 |
|
if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) { |
| 91 |
|
$parenthesis = array_keys($tokens[$stackPtr]['nested_parenthesis']); |
| 92 |
|
$bracket = array_pop($parenthesis); |
| 93 |
|
if (isset($tokens[$bracket]['parenthesis_owner']) === true) { |
| 94 |
|
$function = $tokens[$bracket]['parenthesis_owner']; |
| 95 |
|
if ($tokens[$function]['code'] === T_FUNCTION |
| 96 |
|
|| $tokens[$function]['code'] === T_CLOSURE |
| 97 |
|
) { |
| 98 |
|
return; |
| 99 |
|
} |
| 100 |
|
} |
| 101 |
|
} |
| 102 |
|
} |
| 103 |
|
|
vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/ArrayDeclarationSniff.php 1 location
|
@@ 147-153 (lines=7) @@
|
| 144 |
|
// Find all the double arrows that reside in this scope. |
| 145 |
|
for ( $nextToken = ( $stackPtr + 1 ); $nextToken < $arrayEnd; $nextToken++ ) { |
| 146 |
|
// Skip bracketed statements, like function calls. |
| 147 |
|
if ( T_OPEN_PARENTHESIS === $tokens[ $nextToken ]['code'] |
| 148 |
|
&& ( ! isset( $tokens[ $nextToken ]['parenthesis_owner'] ) |
| 149 |
|
|| $tokens[ $nextToken ]['parenthesis_owner'] !== $stackPtr ) |
| 150 |
|
) { |
| 151 |
|
$nextToken = $tokens[ $nextToken ]['parenthesis_closer']; |
| 152 |
|
continue; |
| 153 |
|
} |
| 154 |
|
|
| 155 |
|
if ( T_ARRAY === $tokens[ $nextToken ]['code'] ) { |
| 156 |
|
// Let subsequent calls of this test handle nested arrays. |