mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
[ticket/16382] Update Twig_Token
PHPBB3-16382
This commit is contained in:
@@ -31,24 +31,24 @@ class php extends \Twig_TokenParser
|
||||
/**
|
||||
* Parses a token and returns a node.
|
||||
*
|
||||
* @param \Twig_Token $token A Twig_Token instance
|
||||
* @param \Twig\Token $token A Twig_Token instance
|
||||
*
|
||||
* @return \Twig_Node A Twig_Node instance
|
||||
*/
|
||||
public function parse(\Twig_Token $token)
|
||||
public function parse(\Twig\Token $token)
|
||||
{
|
||||
$stream = $this->parser->getStream();
|
||||
|
||||
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
|
||||
$stream->expect(\Twig\Token::BLOCK_END_TYPE);
|
||||
|
||||
$body = $this->parser->subparse(array($this, 'decideEnd'), true);
|
||||
|
||||
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
|
||||
$stream->expect(\Twig\Token::BLOCK_END_TYPE);
|
||||
|
||||
return new \phpbb\template\twig\node\php($body, $this->environment, $token->getLine(), $this->getTag());
|
||||
}
|
||||
|
||||
public function decideEnd(\Twig_Token $token)
|
||||
public function decideEnd(\Twig\Token $token)
|
||||
{
|
||||
return $token->test('ENDPHP');
|
||||
}
|
||||
|
Reference in New Issue
Block a user