Sniffs/PHP/ForbiddenEmptyListAssignmentSniff.php 1 location
|
@@ 69-71 (lines=3) @@
|
| 66 |
|
$tokens = $phpcsFile->getTokens(); |
| 67 |
|
|
| 68 |
|
$open = $phpcsFile->findNext(T_OPEN_PARENTHESIS, $stackPtr, null, false, null, true); |
| 69 |
|
if ($open === false || isset($tokens[$open]['parenthesis_closer']) === false) { |
| 70 |
|
return; |
| 71 |
|
} |
| 72 |
|
|
| 73 |
|
$close = $tokens[$open]['parenthesis_closer']; |
| 74 |
|
$error = true; |
Sniffs/PHP/EmptyNonVariableSniff.php 1 location
|
@@ 85-87 (lines=3) @@
|
| 82 |
|
$tokens = $phpcsFile->getTokens(); |
| 83 |
|
|
| 84 |
|
$open = $phpcsFile->findNext(T_OPEN_PARENTHESIS, $stackPtr, null, false, null, true); |
| 85 |
|
if ($open === false || isset($tokens[$open]['parenthesis_closer']) === false) { |
| 86 |
|
return; |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
$close = $tokens[$open]['parenthesis_closer']; |
| 90 |
|
|
Sniffs/PHP/NewExecutionDirectivesSniff.php 1 location
|
@@ 94-96 (lines=3) @@
|
| 91 |
|
|
| 92 |
|
// Deal with PHPCS 1.x which does not set the parenthesis properly for declare statements. |
| 93 |
|
$openParenthesis = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($stackPtr + 1), null, false, null, true); |
| 94 |
|
if ($openParenthesis === false || isset($tokens[$openParenthesis]['parenthesis_closer']) === false) { |
| 95 |
|
return; |
| 96 |
|
} |
| 97 |
|
$closeParenthesis = $tokens[$openParenthesis]['parenthesis_closer']; |
| 98 |
|
} |
| 99 |
|
|