Skip to content

Commit

Permalink
#2407 - Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Aug 31, 2023
1 parent 25ce077 commit 6af9e8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Library/Statements/ForStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,8 @@ public function compileRange(array $exprRaw, CompilationContext $compilationCont
$codePrinter->output('}');
$codePrinter->decreaseLevel();
$codePrinter->output('}');

return true;
}

/**
Expand All @@ -396,11 +398,11 @@ public function compileRange(array $exprRaw, CompilationContext $compilationCont
* @param array $exprRaw
* @param CompilationContext $compilationContext
*
* @return bool
* @return void
* @throws Exception
* @throws ReflectionException
*/
public function compileIterator(array $exprRaw, CompilationContext $compilationContext): bool
public function compileIterator(array $exprRaw, CompilationContext $compilationContext): void
{
$iteratorVariable = $compilationContext->symbolTable->getTempVariableForWrite('zend_object_iterator', $compilationContext);
$compilationContext->headersManager->add('kernel/iterator');
Expand All @@ -418,10 +420,6 @@ public function compileIterator(array $exprRaw, CompilationContext $compilationC
}

$exprVariable = $compilationContext->symbolTable->getVariableForRead($expression->getCode(), $compilationContext, $this->statement['expr']);
switch ($exprVariable->getType()) {
case 'variable':
break;
}

/**
* Initialize 'key' variable
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/exit.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

use Stub\ExitDie;

if (!extension_loaded('stub')) {
Expand Down

0 comments on commit 6af9e8a

Please sign in to comment.