mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
[ticket/16654] Upgrade Twig to version 3
PHPBB3-16654
This commit is contained in:
@@ -41,7 +41,7 @@ class defineparser extends \Twig\TokenParser\AbstractTokenParser
|
||||
{
|
||||
// This would happen if someone improperly formed their DEFINE syntax
|
||||
// e.g. <!-- DEFINE $VAR = foo -->
|
||||
throw new \Twig\Error\SyntaxError('Invalid DEFINE', $token->getLine(), $this->parser->getStream()->getSourceContext()->getPath());
|
||||
throw new \Twig\Error\SyntaxError('Invalid DEFINE', $token->getLine(), $this->parser->getStream()->getSourceContext());
|
||||
}
|
||||
|
||||
$stream->expect(\Twig\Token::BLOCK_END_TYPE);
|
||||
|
@@ -23,7 +23,7 @@ class includeparser extends \Twig\TokenParser\IncludeTokenParser
|
||||
*
|
||||
* @return \Twig\Node\Node A Twig\Node instance
|
||||
*/
|
||||
public function parse(\Twig\Token $token)
|
||||
public function parse(\Twig\Token $token) : \Twig\Node\Node
|
||||
{
|
||||
$expr = $this->parser->getExpressionParser()->parseExpression();
|
||||
|
||||
@@ -37,7 +37,7 @@ class includeparser extends \Twig\TokenParser\IncludeTokenParser
|
||||
*
|
||||
* @return string The tag name
|
||||
*/
|
||||
public function getTag()
|
||||
public function getTag() : string
|
||||
{
|
||||
return 'INCLUDE';
|
||||
}
|
||||
|
Reference in New Issue
Block a user