PHPCompatibility/Sniff.php 1 location
|
@@ 1874-1878 (lines=5) @@
|
| 1871 |
|
} |
| 1872 |
|
|
| 1873 |
|
// Check if the variable found is at the right level. Deeper levels are always an error. |
| 1874 |
|
if (isset($tokens[$hasVariable]['nested_parenthesis']) |
| 1875 |
|
&& count($tokens[$hasVariable]['nested_parenthesis']) !== $targetNestingLevel |
| 1876 |
|
) { |
| 1877 |
|
return false; |
| 1878 |
|
} |
| 1879 |
|
|
| 1880 |
|
// Ok, so the first variable is at the right level, now are there any |
| 1881 |
|
// blacklisted tokens within the empty() ? |
PHPCompatibility/Sniffs/PHP/NewConstantScalarExpressionsSniff.php 1 location
|
@@ 272-274 (lines=3) @@
|
| 269 |
|
} |
| 270 |
|
|
| 271 |
|
$targetNestingLevel = 0; |
| 272 |
|
if (isset($tokens[$stackPtr]['nested_parenthesis']) == true) { |
| 273 |
|
$targetNestingLevel = count($tokens[$stackPtr]['nested_parenthesis']); |
| 274 |
|
} |
| 275 |
|
|
| 276 |
|
// Examine each variable/constant in multi-declarations. |
| 277 |
|
$start = $stackPtr; |