PHPCompatibility/Sniffs/PHP/NewClosureSniff.php 1 location
|
@@ 231-233 (lines=3) @@
|
| 228 |
|
|
| 229 |
|
// T_STATIC, make sure it is used as a class reference. |
| 230 |
|
$next = $phpcsFile->findNext(\PHP_CodeSniffer_Tokens::$emptyTokens, ($classRef + 1), $endToken, true); |
| 231 |
|
if ($next === false || $tokens[$next]['code'] !== T_DOUBLE_COLON) { |
| 232 |
|
return false; |
| 233 |
|
} |
| 234 |
|
|
| 235 |
|
return $classRef; |
| 236 |
|
} |
PHPCompatibility/Sniffs/PHP/NewConstantScalarExpressionsSniff.php 1 location
|
@@ 395-397 (lines=3) @@
|
| 392 |
|
|| $tokens[$nextNonSimple]['code'] === T_SELF |
| 393 |
|
) { |
| 394 |
|
// Allow only `parent::` and `self::`. |
| 395 |
|
if ($nextNonEmpty === false || $tokens[$nextNonEmpty]['code'] !== T_DOUBLE_COLON) { |
| 396 |
|
return false; |
| 397 |
|
} |
| 398 |
|
} elseif ($tokens[$nextNonSimple]['code'] === T_DOUBLE_COLON) { |
| 399 |
|
// Allow only `T_STRING::T_STRING`. |
| 400 |
|
if ($nextNonEmpty === false || $tokens[$nextNonEmpty]['code'] !== T_STRING) { |