mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-25 21:26:36 +00:00
Merge branch '3.x' into 4.x
* 3.x: Fix doc markup Add an example on how to iterate over a string Remove NodeCaptureInterface from TypesNode Use CPP in full code base Add types tag Bump version Bump version Prepare the 3.12.0 release Fix CS Add conditional return types to `ensureTraversable` Add return type `isTraitable`
This commit is contained in:
@@ -47,17 +47,15 @@ class ExpressionParser
|
||||
public const OPERATOR_LEFT = 1;
|
||||
public const OPERATOR_RIGHT = 2;
|
||||
|
||||
private Parser $parser;
|
||||
private Environment $env;
|
||||
/** @var array<string, array{precedence: int, class: class-string<AbstractUnary>}> */
|
||||
private array $unaryOperators;
|
||||
/** @var array<string, array{precedence: int, class: class-string<AbstractBinary>, associativity: self::OPERATOR_*}> */
|
||||
private array $binaryOperators;
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user