mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-11-27 04:14:44 +01:00
Remove unused variables (#357)
This commit is contained in:
parent
54b61ebe7c
commit
9857a545e2
@ -157,7 +157,7 @@ class Lexer
|
||||
|
||||
$filePos = 0;
|
||||
$line = 1;
|
||||
foreach ($this->tokens as $i => $token) {
|
||||
foreach ($this->tokens as $token) {
|
||||
$tokenValue = \is_string($token) ? $token : $token[1];
|
||||
$tokenLen = \strlen($tokenValue);
|
||||
|
||||
|
@ -72,7 +72,6 @@ class Emulative extends \PhpParser\Lexer
|
||||
// the tokens array on the way
|
||||
$line = 1;
|
||||
for ($i = 0, $c = count($this->tokens); $i < $c; ++$i) {
|
||||
$replace = null;
|
||||
if (isset($this->tokens[$i + 1])) {
|
||||
if ($this->tokens[$i] === '?' && $this->tokens[$i + 1] === '?') {
|
||||
array_splice($this->tokens, $i, 2, array(
|
||||
|
@ -462,7 +462,7 @@ abstract class PrettyPrinterAbstract
|
||||
|
||||
$result = '';
|
||||
$pos = $startPos;
|
||||
foreach ($node->getSubNodeNames() as $i => $subNodeName) {
|
||||
foreach ($node->getSubNodeNames() as $subNodeName) {
|
||||
$subNode = $node->$subNodeName;
|
||||
$origSubNode = $origNode->$subNodeName;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user