@@ 929-931 (lines=3) @@ | ||
926 | $tokens = $phpcsFile->getTokens(); |
|
927 | ||
928 | // Check for the existence of the token. |
|
929 | if ($stackPtr === false || isset($tokens[$stackPtr]) === false) { |
|
930 | return false; |
|
931 | } |
|
932 | ||
933 | if ($tokens[$stackPtr]['code'] !== T_NAMESPACE) { |
|
934 | return false; |
|
@@ 1117-1119 (lines=3) @@ | ||
1114 | { |
|
1115 | $tokens = $phpcsFile->getTokens(); |
|
1116 | ||
1117 | if (isset($tokens[$stackPtr]) === false || $tokens[$stackPtr]['code'] !== T_VARIABLE) { |
|
1118 | return false; |
|
1119 | } |
|
1120 | ||
1121 | // Note: interfaces can not declare properties. |
|
1122 | $validScopes = array( |
|
@@ 1151-1153 (lines=3) @@ | ||
1148 | { |
|
1149 | $tokens = $phpcsFile->getTokens(); |
|
1150 | ||
1151 | if (isset($tokens[$stackPtr]) === false || $tokens[$stackPtr]['code'] !== T_CONST) { |
|
1152 | return false; |
|
1153 | } |
|
1154 | ||
1155 | // Note: traits can not declare constants. |
|
1156 | $validScopes = array( |