Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jul 31, 2024
1 parent 7324404 commit ab0c632
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Test/NodeTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ protected function getCompiler(?Environment $environment = null)

protected function getEnvironment()
{
if (!$this->currentEnv) {
$this->currentEnv = new Environment(new ArrayLoader());
}

return $this->currentEnv;
return $this->currentEnv ??= new Environment(new ArrayLoader());
}

protected function getVariableGetter($name, $line = false)
Expand Down

0 comments on commit ab0c632

Please sign in to comment.