This commit is contained in:
Fabien Potencier
2019-02-15 07:56:53 +01:00
parent 7600efc010
commit 966296ff42
+2 -2
View File
@@ -19,7 +19,7 @@ abstract class Twig_BaseNodeVisitor implements Twig_NodeVisitorInterface
final public function enterNode(Twig_NodeInterface $node, Twig_Environment $env)
{
if (!$node instanceof Twig_Node) {
throw new \LogicException('Twig_BaseNodeVisitor only supports Twig_Node instances.');
throw new \LogicException(sprintf('%s only supports Twig_Node instances.', __CLASS__));
}
return $this->doEnterNode($node, $env);
@@ -28,7 +28,7 @@ abstract class Twig_BaseNodeVisitor implements Twig_NodeVisitorInterface
final public function leaveNode(Twig_NodeInterface $node, Twig_Environment $env)
{
if (!$node instanceof Twig_Node) {
throw new \LogicException('Twig_BaseNodeVisitor only supports Twig_Node instances.');
throw new \LogicException(sprintf('%s only supports Twig_Node instances.', __CLASS__));
}
return $this->doLeaveNode($node, $env);