Remove const optimization

This commit is contained in:
Fabien Potencier
2024-08-12 09:39:57 +02:00
parent 93e66ad141
commit cd0ac3cc0a
13 changed files with 106 additions and 106 deletions
+2 -2
View File
@@ -35,7 +35,7 @@ final class BlockTokenParser extends AbstractTokenParser
{
$lineno = $token->getLine();
$stream = $this->parser->getStream();
$name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue();
$name = $stream->expect(Token::NAME_TYPE)->getValue();
if ($this->parser->hasBlock($name)) {
throw new SyntaxError(\sprintf("The block '%s' has already been defined line %d.", $name, $this->parser->getBlock($name)->getTemplateLine()), $stream->getCurrent()->getLine(), $stream->getSourceContext());
}
@@ -45,7 +45,7 @@ final class BlockTokenParser extends AbstractTokenParser
if ($stream->nextIf(/* Token::BLOCK_END_TYPE */ 3)) {
$body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
if ($token = $stream->nextIf(/* Token::NAME_TYPE */ 5)) {
if ($token = $stream->nextIf(Token::NAME_TYPE)) {
$value = $token->getValue();
if ($value != $name) {