mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 17:54:55 +02:00
Update Twig to v2.15.4
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user