|
@@ 333-338 (lines=6) @@
|
| 330 |
|
if ($finalTokens[($stackPtr - 1)]['code'] === T_STRING) { |
| 331 |
|
$newContent = $finalTokens[($stackPtr - 1)]['content'].'-'.$finalTokens[($stackPtr + 1)]['content']; |
| 332 |
|
|
| 333 |
|
if (PHP_CodeSniffer_VERBOSITY > 1) { |
| 334 |
|
echo "\t\t* token is a string joiner; ignoring this and previous token".PHP_EOL; |
| 335 |
|
$old = Util\Common::prepareForOutput($finalTokens[($stackPtr + 1)]['content']); |
| 336 |
|
$new = Util\Common::prepareForOutput($newContent); |
| 337 |
|
echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$old\" to \"$new\"".PHP_EOL; |
| 338 |
|
} |
| 339 |
|
|
| 340 |
|
$finalTokens[($stackPtr + 1)]['content'] = $newContent; |
| 341 |
|
unset($finalTokens[$stackPtr]); |
|
@@ 351-355 (lines=5) @@
|
| 348 |
|
} |
| 349 |
|
} else if ($finalTokens[($stackPtr + 1)]['code'] === T_LNUMBER) { |
| 350 |
|
// They can also be used to provide negative numbers. |
| 351 |
|
if (PHP_CodeSniffer_VERBOSITY > 1) { |
| 352 |
|
echo "\t\t* token is part of a negative number; adding content to next token and ignoring *".PHP_EOL; |
| 353 |
|
$content = Util\Common::prepareForOutput($finalTokens[($stackPtr + 1)]['content']); |
| 354 |
|
echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$content\" to \"-$content\"".PHP_EOL; |
| 355 |
|
} |
| 356 |
|
|
| 357 |
|
$finalTokens[($stackPtr + 1)]['content'] = '-'.$finalTokens[($stackPtr + 1)]['content']; |
| 358 |
|
unset($finalTokens[$stackPtr]); |