mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-15 02:04:54 +02:00
Update Twig to v2.15.4
This commit is contained in:
@@ -55,24 +55,12 @@ abstract class NodeTestCase extends TestCase
|
||||
{
|
||||
$line = $line > 0 ? "// line {$line}\n" : '';
|
||||
|
||||
if (\PHP_VERSION_ID >= 70000) {
|
||||
return sprintf('%s($context["%s"] ?? null)', $line, $name);
|
||||
}
|
||||
|
||||
if (\PHP_VERSION_ID >= 50400) {
|
||||
return sprintf('%s(isset($context["%s"]) ? $context["%s"] : null)', $line, $name, $name);
|
||||
}
|
||||
|
||||
return sprintf('%s$this->getContext($context, "%s")', $line, $name);
|
||||
return sprintf('%s($context["%s"] ?? null)', $line, $name);
|
||||
}
|
||||
|
||||
protected function getAttributeGetter()
|
||||
{
|
||||
if (\function_exists('twig_template_get_attributes')) {
|
||||
return 'twig_template_get_attributes($this, ';
|
||||
}
|
||||
|
||||
return '$this->getAttribute(';
|
||||
return 'twig_get_attribute($this->env, $this->source, ';
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user