Skip to content

Commit

Permalink
DeclareDeclare -> DeclareItem (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
janedbal authored Nov 26, 2024
1 parent c019f58 commit 97f9e99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Compiler/Php/PhpCodeBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use PhpParser\BuilderFactory;
use PhpParser\Node\Arg;
use PhpParser\Node\ArrayItem;
use PhpParser\Node\DeclareItem;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ArrayDimFetch;
Expand All @@ -35,7 +36,6 @@
use PhpParser\Node\Stmt\ClassConst;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Declare_;
use PhpParser\Node\Stmt\DeclareDeclare;
use PhpParser\Node\Stmt\Else_;
use PhpParser\Node\Stmt\ElseIf_;
use PhpParser\Node\Stmt\Expression;
Expand Down Expand Up @@ -638,7 +638,7 @@ public function file(string $namespaceName, array $statements): array
}

return [
new Declare_([new DeclareDeclare('strict_types', $this->val(1))]),
new Declare_([new DeclareItem('strict_types', $this->val(1))]),
new Nop(),
...$statements,
];
Expand Down

0 comments on commit 97f9e99

Please sign in to comment.