minor #4228 Use CPP in full code base (andreybolonin)

This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Use CPP in full code base

Commits
-------

28923f42 Use CPP in full code base
This commit is contained in:
Fabien Potencier
2024-08-29 19:29:42 +02:00
23 changed files with 74 additions and 119 deletions
+4 -6
View File
@@ -47,18 +47,16 @@ class ExpressionParser
public const OPERATOR_LEFT = 1;
public const OPERATOR_RIGHT = 2;
private $parser;
private $env;
/** @var array<string, array{precedence: int, class: class-string<AbstractUnary>}> */
private $unaryOperators;
/** @var array<string, array{precedence: int, class: class-string<AbstractBinary>, associativity: self::OPERATOR_*}> */
private $binaryOperators;
private $readyNodes = [];
public function __construct(Parser $parser, Environment $env)
{
$this->parser = $parser;
$this->env = $env;
public function __construct(
private Parser $parser,
private Environment $env,
) {
$this->unaryOperators = $env->getUnaryOperators();
$this->binaryOperators = $env->getBinaryOperators();
}