diff --git a/core/lib/Drupal/Core/Template/TwigNodeTrans.php b/core/lib/Drupal/Core/Template/TwigNodeTrans.php index dddc273..2aeb1f5 100644 --- a/core/lib/Drupal/Core/Template/TwigNodeTrans.php +++ b/core/lib/Drupal/Core/Template/TwigNodeTrans.php @@ -24,7 +24,7 @@ class TwigNodeTrans extends \Twig_Node { /** * {@inheritdoc} */ - public function __construct(\Twig_NodeInterface $body, \Twig_NodeInterface $plural = NULL, \Twig_Node_Expression $count = NULL, \Twig_Node_Expression $options = NULL, $lineno, $tag = NULL) { + public function __construct(\Twig_Node $body, \Twig_Node $plural = NULL, \Twig_Node_Expression $count = NULL, \Twig_Node_Expression $options = NULL, $lineno, $tag = NULL) { parent::__construct(array( 'count' => $count, 'body' => $body, @@ -103,7 +103,7 @@ public function compile(\Twig_Compiler $compiler) { /** * Extracts the text and tokens for the "trans" tag. * - * @param \Twig_NodeInterface $body + * @param \Twig_Node $body * The node to compile. * * @return array @@ -113,7 +113,7 @@ public function compile(\Twig_Compiler $compiler) { * - array $tokens * The extracted tokens as new \Twig_Node_Expression_Name instances. */ - protected function compileString(\Twig_NodeInterface $body) { + protected function compileString(\Twig_Node $body) { if ($body instanceof \Twig_Node_Expression_Name || $body instanceof \Twig_Node_Expression_Constant || $body instanceof \Twig_Node_Expression_TempName) { return array($body, array()); } diff --git a/core/lib/Drupal/Core/Template/TwigNodeVisitor.php b/core/lib/Drupal/Core/Template/TwigNodeVisitor.php index 710faa0..bd8d684 100644 --- a/core/lib/Drupal/Core/Template/TwigNodeVisitor.php +++ b/core/lib/Drupal/Core/Template/TwigNodeVisitor.php @@ -30,7 +30,7 @@ class TwigNodeVisitor implements \Twig_NodeVisitorInterface { /** * Implements Twig_NodeVisitorInterface::enterNode(). */ - function enterNode(\Twig_NodeInterface $node, \Twig_Environment $env) { + function enterNode(\Twig_Node $node, \Twig_Environment $env) { if ($node instanceof \Twig_Node_Expression_Function) { $name = $node->getAttribute('name'); $func = $env->getFunction($name); @@ -60,7 +60,7 @@ function enterNode(\Twig_NodeInterface $node, \Twig_Environment $env) { * * @see twig_render */ - function leaveNode(\Twig_NodeInterface $node, \Twig_Environment $env) { + function leaveNode(\Twig_Node $node, \Twig_Environment $env) { if ($node instanceof \Twig_Node_Print) { $this->isReference = FALSE; diff --git a/core/lib/Drupal/Core/Template/TwigTransTokenParser.php b/core/lib/Drupal/Core/Template/TwigTransTokenParser.php index c67f463..009cc9c 100644 --- a/core/lib/Drupal/Core/Template/TwigTransTokenParser.php +++ b/core/lib/Drupal/Core/Template/TwigTransTokenParser.php @@ -82,14 +82,14 @@ public function getTag() { /** * Ensure that any nodes that are parsed are only of allowed types. * - * @param \Twig_NodeInterface $body + * @param \Twig_Node $body * The expression to check. * @param integer $lineno * The source line. * * @throws \Twig_Error_Syntax */ - protected function checkTransString(\Twig_NodeInterface $body, $lineno) { + protected function checkTransString(\Twig_Node $body, $lineno) { foreach ($body as $node) { if ( $node instanceof \Twig_Node_Text