diff options
Diffstat (limited to 'vendor/symfony/expression-language/Node/BinaryNode.php')
| -rw-r--r-- | vendor/symfony/expression-language/Node/BinaryNode.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/vendor/symfony/expression-language/Node/BinaryNode.php b/vendor/symfony/expression-language/Node/BinaryNode.php index 191970ca1e..3820f880e7 100644 --- a/vendor/symfony/expression-language/Node/BinaryNode.php +++ b/vendor/symfony/expression-language/Node/BinaryNode.php @@ -20,13 +20,13 @@ use Symfony\Component\ExpressionLanguage\Compiler; */ class BinaryNode extends Node { - private static $operators = [ + private const OPERATORS = [ '~' => '.', 'and' => '&&', 'or' => '||', ]; - private static $functions = [ + private const FUNCTIONS = [ '**' => 'pow', '..' => 'range', 'in' => 'in_array', @@ -57,9 +57,9 @@ class BinaryNode extends Node return; } - if (isset(self::$functions[$operator])) { + if (isset(self::FUNCTIONS[$operator])) { $compiler - ->raw(sprintf('%s(', self::$functions[$operator])) + ->raw(sprintf('%s(', self::FUNCTIONS[$operator])) ->compile($this->nodes['left']) ->raw(', ') ->compile($this->nodes['right']) @@ -69,8 +69,8 @@ class BinaryNode extends Node return; } - if (isset(self::$operators[$operator])) { - $operator = self::$operators[$operator]; + if (isset(self::OPERATORS[$operator])) { + $operator = self::OPERATORS[$operator]; } $compiler @@ -89,13 +89,13 @@ class BinaryNode extends Node $operator = $this->attributes['operator']; $left = $this->nodes['left']->evaluate($functions, $values); - if (isset(self::$functions[$operator])) { + if (isset(self::FUNCTIONS[$operator])) { $right = $this->nodes['right']->evaluate($functions, $values); if ('not in' === $operator) { return !\in_array($left, $right); } - $f = self::$functions[$operator]; + $f = self::FUNCTIONS[$operator]; return $f($left, $right); } |
