mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-13 23:35:49 +00:00
added type hints
This commit is contained in:
@@ -29,7 +29,7 @@ use Twig\Token;
|
||||
*/
|
||||
final class BlockTokenParser extends AbstractTokenParser
|
||||
{
|
||||
public function parse(Token $token)
|
||||
public function parse(Token $token): Node
|
||||
{
|
||||
$lineno = $token->getLine();
|
||||
$stream = $this->parser->getStream();
|
||||
@@ -64,12 +64,12 @@ final class BlockTokenParser extends AbstractTokenParser
|
||||
return new BlockReferenceNode($name, $lineno, $this->getTag());
|
||||
}
|
||||
|
||||
public function decideBlockEnd(Token $token)
|
||||
public function decideBlockEnd(Token $token): bool
|
||||
{
|
||||
return $token->test('endblock');
|
||||
}
|
||||
|
||||
public function getTag()
|
||||
public function getTag(): string
|
||||
{
|
||||
return 'block';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user