Update Twig to v2.15.4

This commit is contained in:
slawkens
2023-02-02 10:37:45 +01:00
parent e552bcfe82
commit 130f7ba405
309 changed files with 3802 additions and 4005 deletions

View File

@@ -23,21 +23,13 @@ use Twig\Node\Node;
*/
abstract class AbstractNodeVisitor implements NodeVisitorInterface
{
final public function enterNode(\Twig_NodeInterface $node, Environment $env)
final public function enterNode(Node $node, Environment $env)
{
if (!$node instanceof Node) {
throw new \LogicException(sprintf('%s only supports \Twig\Node\Node instances.', __CLASS__));
}
return $this->doEnterNode($node, $env);
}
final public function leaveNode(\Twig_NodeInterface $node, Environment $env)
final public function leaveNode(Node $node, Environment $env)
{
if (!$node instanceof Node) {
throw new \LogicException(sprintf('%s only supports \Twig\Node\Node instances.', __CLASS__));
}
return $this->doLeaveNode($node, $env);
}
@@ -51,7 +43,7 @@ abstract class AbstractNodeVisitor implements NodeVisitorInterface
/**
* Called after child nodes are visited.
*
* @return Node|false|null The modified node or null if the node must be removed
* @return Node|null The modified node or null if the node must be removed
*/
abstract protected function doLeaveNode(Node $node, Environment $env);
}