Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Jun 15, 2024
1 parent 00e15f1 commit e0b89f3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/php/lang/ast/emit/PropertyHooks.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ protected function withScopeCheck($modifiers, $nodes) {
return new Block($nodes);
}

array_unshift($nodes, new Code($check));
return new Block($nodes);
return new Block([new Code($check), ...$nodes]);
}

protected function emitEmulatedHooks($result, $property) {
Expand Down

0 comments on commit e0b89f3

Please sign in to comment.