| @@ 140-149 (lines=10) @@ | ||
| 137 | * |
|
| 138 | * @return void |
|
| 139 | */ |
|
| 140 | protected function processConstant() |
|
| 141 | { |
|
| 142 | $constName = $this->stream->currentText(); |
|
| 143 | if (!isset($this->constants[$constName]) && !preg_match('(^(?:false|null|true)$)Di', $constName)) |
|
| 144 | { |
|
| 145 | return; |
|
| 146 | } |
|
| 147 | ||
| 148 | $this->stream->replace([T_STRING, '\\' . $constName]); |
|
| 149 | } |
|
| 150 | ||
| 151 | /** |
|
| 152 | * Process the function name at current offset |
|
| @@ 156-165 (lines=10) @@ | ||
| 153 | * |
|
| 154 | * @return void |
|
| 155 | */ |
|
| 156 | protected function processFunctionCall() |
|
| 157 | { |
|
| 158 | $funcName = $this->stream->currentText(); |
|
| 159 | if (!isset($this->functions[$funcName])) |
|
| 160 | { |
|
| 161 | return; |
|
| 162 | } |
|
| 163 | ||
| 164 | $this->stream->replace([T_STRING, '\\' . $funcName]); |
|
| 165 | } |
|
| 166 | } |
|