mirror of
https://github.com/twigphp/Twig.git
synced 2026-11-10 12:06:46 +00:00
Merge branch '1.x' into 2.x
* 1.x: Add Parser typehint allowed Twig\NodeVisitor\NodeVisitorInterface::leaveNode() to return "null" instead of "false" (same meaning)
This commit is contained in:
@@ -17,6 +17,8 @@ use Twig\Node\Node;
|
||||
/**
|
||||
* Used to make node visitors compatible with Twig 1.x and 2.x.
|
||||
*
|
||||
* To be removed in Twig 3.1.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
abstract class AbstractNodeVisitor implements NodeVisitorInterface
|
||||
@@ -41,7 +43,7 @@ abstract class AbstractNodeVisitor implements NodeVisitorInterface
|
||||
/**
|
||||
* Called after child nodes are visited.
|
||||
*
|
||||
* @return Node|false The modified node or false if the node must be removed
|
||||
* @return Node|false|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