|
@@ 155-171 (lines=17) @@
|
| 152 |
|
continue; |
| 153 |
|
} |
| 154 |
|
|
| 155 |
|
if ( T_ARRAY === $tokens[ $nextToken ]['code'] ) { |
| 156 |
|
// Let subsequent calls of this test handle nested arrays. |
| 157 |
|
if ( T_DOUBLE_ARROW !== $tokens[ $lastToken ]['code'] ) { |
| 158 |
|
$indices[] = array( 'value' => $nextToken ); |
| 159 |
|
$lastToken = $nextToken; |
| 160 |
|
} |
| 161 |
|
|
| 162 |
|
$nextToken = $tokens[ $tokens[ $nextToken ]['parenthesis_opener'] ]['parenthesis_closer']; |
| 163 |
|
$nextToken = $phpcsFile->findNext( T_WHITESPACE, ( $nextToken + 1 ), null, true ); |
| 164 |
|
if ( T_COMMA !== $tokens[ $nextToken ]['code'] ) { |
| 165 |
|
$nextToken--; |
| 166 |
|
} else { |
| 167 |
|
$lastToken = $nextToken; |
| 168 |
|
} |
| 169 |
|
|
| 170 |
|
continue; |
| 171 |
|
} |
| 172 |
|
|
| 173 |
|
if ( T_OPEN_SHORT_ARRAY === $tokens[ $nextToken ]['code'] ) { |
| 174 |
|
// Let subsequent calls of this test handle nested arrays. |
|
@@ 173-189 (lines=17) @@
|
| 170 |
|
continue; |
| 171 |
|
} |
| 172 |
|
|
| 173 |
|
if ( T_OPEN_SHORT_ARRAY === $tokens[ $nextToken ]['code'] ) { |
| 174 |
|
// Let subsequent calls of this test handle nested arrays. |
| 175 |
|
if ( T_DOUBLE_ARROW !== $tokens[ $lastToken ]['code'] ) { |
| 176 |
|
$indices[] = array( 'value' => $nextToken ); |
| 177 |
|
$lastToken = $nextToken; |
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
$nextToken = $tokens[ $nextToken ]['bracket_closer']; |
| 181 |
|
$nextToken = $phpcsFile->findNext( T_WHITESPACE, ( $nextToken + 1 ), null, true ); |
| 182 |
|
if ( T_COMMA !== $tokens[ $nextToken ]['code'] ) { |
| 183 |
|
$nextToken--; |
| 184 |
|
} else { |
| 185 |
|
$lastToken = $nextToken; |
| 186 |
|
} |
| 187 |
|
|
| 188 |
|
continue; |
| 189 |
|
} |
| 190 |
|
|
| 191 |
|
if ( T_CLOSURE === $tokens[ $nextToken ]['code'] ) { |
| 192 |
|
if ( T_DOUBLE_ARROW !== $tokens[ $lastToken ]['code'] ) { |
|
@@ 191-206 (lines=16) @@
|
| 188 |
|
continue; |
| 189 |
|
} |
| 190 |
|
|
| 191 |
|
if ( T_CLOSURE === $tokens[ $nextToken ]['code'] ) { |
| 192 |
|
if ( T_DOUBLE_ARROW !== $tokens[ $lastToken ]['code'] ) { |
| 193 |
|
$indices[] = array( 'value' => $nextToken ); |
| 194 |
|
$lastToken = $nextToken; |
| 195 |
|
} |
| 196 |
|
|
| 197 |
|
$nextToken = $tokens[ $nextToken ]['scope_closer']; |
| 198 |
|
$nextToken = $phpcsFile->findNext( T_WHITESPACE, ( $nextToken + 1 ), null, true ); |
| 199 |
|
if ( T_COMMA !== $tokens[ $nextToken ]['code'] ) { |
| 200 |
|
$nextToken--; |
| 201 |
|
} else { |
| 202 |
|
$lastToken = $nextToken; |
| 203 |
|
} |
| 204 |
|
|
| 205 |
|
continue; |
| 206 |
|
} |
| 207 |
|
|
| 208 |
|
if ( T_DOUBLE_ARROW !== $tokens[ $nextToken ]['code'] && T_COMMA !== $tokens[ $nextToken ]['code'] ) { |
| 209 |
|
continue; |