|
@@ 264-267 (lines=4) @@
|
| 261 |
|
*/ |
| 262 |
|
private function isTCoalesceEqual($tokens, $stackPtr) |
| 263 |
|
{ |
| 264 |
|
if ($tokens[$stackPtr]['code'] !== T_EQUAL || isset($tokens[($stackPtr - 1)]) === false) { |
| 265 |
|
// Function called for wrong token or token has no predecesor. |
| 266 |
|
return false; |
| 267 |
|
} |
| 268 |
|
|
| 269 |
|
if ($tokens[($stackPtr - 1)]['type'] === 'T_COALESCE') { |
| 270 |
|
return true; |
|
@@ 291-294 (lines=4) @@
|
| 288 |
|
*/ |
| 289 |
|
private function isTCoalesce($tokens, $stackPtr) |
| 290 |
|
{ |
| 291 |
|
if ($tokens[$stackPtr]['code'] !== T_INLINE_THEN || isset($tokens[($stackPtr - 1)]) === false) { |
| 292 |
|
// Function called for wrong token or token has no predecesor. |
| 293 |
|
return false; |
| 294 |
|
} |
| 295 |
|
|
| 296 |
|
if ($tokens[($stackPtr - 1)]['code'] === T_INLINE_THEN) { |
| 297 |
|
// Make sure not to confuse it with the T_COALESCE_EQUAL token. |
|
@@ 298-300 (lines=3) @@
|
| 295 |
|
|
| 296 |
|
if ($tokens[($stackPtr - 1)]['code'] === T_INLINE_THEN) { |
| 297 |
|
// Make sure not to confuse it with the T_COALESCE_EQUAL token. |
| 298 |
|
if (isset($tokens[($stackPtr + 1)]) === false || $tokens[($stackPtr + 1)]['code'] !== T_EQUAL) { |
| 299 |
|
return true; |
| 300 |
|
} |
| 301 |
|
} |
| 302 |
|
|
| 303 |
|
return false; |