| @@ 2063-2081 (lines=19) @@ | ||
| 2060 | * |
|
| 2061 | * @return void |
|
| 2062 | */ |
|
| 2063 | public function process(\PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
|
| 2064 | { |
|
| 2065 | $tokens = $phpcsFile->getTokens(); |
|
| 2066 | $constantName = $tokens[$stackPtr]['content']; |
|
| 2067 | ||
| 2068 | if (isset($this->newConstants[$constantName]) === false) { |
|
| 2069 | return; |
|
| 2070 | } |
|
| 2071 | ||
| 2072 | if ($this->isUseOfGlobalConstant($phpcsFile, $stackPtr) === false) { |
|
| 2073 | return; |
|
| 2074 | } |
|
| 2075 | ||
| 2076 | $itemInfo = array( |
|
| 2077 | 'name' => $constantName, |
|
| 2078 | ); |
|
| 2079 | $this->handleFeature($phpcsFile, $stackPtr, $itemInfo); |
|
| 2080 | ||
| 2081 | }//end process() |
|
| 2082 | ||
| 2083 | ||
| 2084 | /** |
|
| @@ 67-85 (lines=19) @@ | ||
| 64 | * |
|
| 65 | * @return void |
|
| 66 | */ |
|
| 67 | public function process(\PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
|
| 68 | { |
|
| 69 | $tokens = $phpcsFile->getTokens(); |
|
| 70 | $constantName = $tokens[$stackPtr]['content']; |
|
| 71 | ||
| 72 | if (isset($this->removedConstants[$constantName]) === false) { |
|
| 73 | return; |
|
| 74 | } |
|
| 75 | ||
| 76 | if ($this->isUseOfGlobalConstant($phpcsFile, $stackPtr) === false) { |
|
| 77 | return; |
|
| 78 | } |
|
| 79 | ||
| 80 | $itemInfo = array( |
|
| 81 | 'name' => $constantName, |
|
| 82 | ); |
|
| 83 | $this->handleFeature($phpcsFile, $stackPtr, $itemInfo); |
|
| 84 | ||
| 85 | }//end process() |
|
| 86 | ||
| 87 | ||
| 88 | /** |
|