Sniffs/PHP/NewScalarReturnTypeDeclarationsSniff.php 1 location
|
@@ 77-87 (lines=11) @@
|
| 74 |
|
* |
| 75 |
|
* @return void |
| 76 |
|
*/ |
| 77 |
|
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
| 78 |
|
{ |
| 79 |
|
$tokens = $phpcsFile->getTokens(); |
| 80 |
|
|
| 81 |
|
if (isset($this->newTypes[$tokens[$stackPtr]['content']]) === true) { |
| 82 |
|
$itemInfo = array( |
| 83 |
|
'name' => $tokens[$stackPtr]['content'], |
| 84 |
|
); |
| 85 |
|
$this->handleFeature($phpcsFile, $stackPtr, $itemInfo); |
| 86 |
|
} |
| 87 |
|
}//end process() |
| 88 |
|
|
| 89 |
|
|
| 90 |
|
/** |
Sniffs/PHP/RemovedGlobalVariablesSniff.php 1 location
|
@@ 58-72 (lines=15) @@
|
| 55 |
|
* |
| 56 |
|
* @return void |
| 57 |
|
*/ |
| 58 |
|
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
| 59 |
|
{ |
| 60 |
|
$tokens = $phpcsFile->getTokens(); |
| 61 |
|
$varName = substr($tokens[$stackPtr]['content'], 1); |
| 62 |
|
|
| 63 |
|
if (isset($this->removedGlobalVariables[$varName]) === false) { |
| 64 |
|
return; |
| 65 |
|
} |
| 66 |
|
|
| 67 |
|
$itemInfo = array( |
| 68 |
|
'name' => $varName, |
| 69 |
|
); |
| 70 |
|
$this->handleFeature($phpcsFile, $stackPtr, $itemInfo); |
| 71 |
|
|
| 72 |
|
}//end process() |
| 73 |
|
|
| 74 |
|
|
| 75 |
|
/** |