mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-27 22:26:10 +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:
+3
-4
@@ -53,7 +53,6 @@ class Parser
|
||||
* @var MacroNode[]
|
||||
*/
|
||||
private array $macros;
|
||||
private Environment $env;
|
||||
private array $importedSymbols;
|
||||
/**
|
||||
* @var Node[]
|
||||
@@ -65,9 +64,9 @@ class Parser
|
||||
private array $embeddedTemplates = [];
|
||||
private int $varNameSalt = 0;
|
||||
|
||||
public function __construct(Environment $env)
|
||||
{
|
||||
$this->env = $env;
|
||||
public function __construct(
|
||||
private Environment $env,
|
||||
) {
|
||||
}
|
||||
|
||||
public function getVarName(): string
|
||||
|
||||
Reference in New Issue
Block a user