From 41a7988cef89128ccabfdc830c27b0beb0022ecb Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 17 Nov 2024 16:45:52 +0100 Subject: [PATCH] Simplify code --- src/Node/Expression/NameExpression.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Node/Expression/NameExpression.php b/src/Node/Expression/NameExpression.php index 322fbc2e083..78ae51f0334 100644 --- a/src/Node/Expression/NameExpression.php +++ b/src/Node/Expression/NameExpression.php @@ -77,10 +77,7 @@ public function compile(Compiler $compiler): void ->string($name) ->raw(']) || array_key_exists(') ->string($name) - ->raw(', $context) ?') - ; - $compiler - ->raw(' $context[') + ->raw(', $context) ? $context[') ->string($name) ->raw('] : (function () { throw new RuntimeError(\'Variable ') ->string($name)