PHPCompatibility/Sniffs/Keywords/ForbiddenNamesSniff.php 1 location
|
@@ 270-276 (lines=7) @@
|
267 |
|
&& $tokens[$nextNonEmpty]['code'] === \T_LIST |
268 |
|
) { |
269 |
|
$parentheses = array_reverse($tokens[$stackPtr]['nested_parenthesis'], true); |
270 |
|
foreach ($parentheses as $open => $close) { |
271 |
|
if (isset($tokens[$open]['parenthesis_owner']) |
272 |
|
&& $tokens[$tokens[$open]['parenthesis_owner']]['code'] === \T_FOREACH |
273 |
|
) { |
274 |
|
return; |
275 |
|
} |
276 |
|
} |
277 |
|
} |
278 |
|
|
279 |
|
/* |
PHPCompatibility/Sniff.php 1 location
|
@@ 1943-1949 (lines=7) @@
|
1940 |
|
&& isset($tokens[$prevNonEmpty]['nested_parenthesis']) === true |
1941 |
|
) { |
1942 |
|
$parentheses = array_reverse($tokens[$prevNonEmpty]['nested_parenthesis'], true); |
1943 |
|
foreach ($parentheses as $open => $close) { |
1944 |
|
if (isset($tokens[$open]['parenthesis_owner']) |
1945 |
|
&& $tokens[$tokens[$open]['parenthesis_owner']]['code'] === \T_FOREACH |
1946 |
|
) { |
1947 |
|
return true; |
1948 |
|
} |
1949 |
|
} |
1950 |
|
} |
1951 |
|
|
1952 |
|
// Maybe this is a short list syntax nested inside another short list syntax ? |