Simplify code

This commit is contained in:
Fabien Potencier
2024-07-31 09:35:41 +02:00
parent 7324404f27
commit ab0c632f02
+1 -5
View File
@@ -53,11 +53,7 @@ abstract class NodeTestCase extends TestCase
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)