Merge branch '3.x' into 4.x

* 3.x:
  Fix CS
This commit is contained in:
Fabien Potencier
2024-11-30 09:43:08 +01:00
8 changed files with 15 additions and 17 deletions
+3 -6
View File
@@ -814,10 +814,8 @@ class ExpressionParser
$token = $stream->next();
if (
Token::NAME_TYPE == $token->getType()
||
Token::NUMBER_TYPE == $token->getType()
||
(Token::OPERATOR_TYPE == $token->getType() && preg_match(Lexer::REGEX_NAME, $token->getValue()))
|| Token::NUMBER_TYPE == $token->getType()
|| (Token::OPERATOR_TYPE == $token->getType() && preg_match(Lexer::REGEX_NAME, $token->getValue()))
) {
$attribute = new ConstantExpression($token->getValue(), $token->getLine());
} else {
@@ -835,8 +833,7 @@ class ExpressionParser
&&
(
null !== $this->parser->getImportedSymbol('template', $node->getAttribute('name'))
||
'_self' === $node->getAttribute('name') && $attribute instanceof ConstantExpression
|| '_self' === $node->getAttribute('name') && $attribute instanceof ConstantExpression
)
) {
return new MacroReferenceExpression(new TemplateVariable($node->getAttribute('name'), $node->getTemplateLine()), 'macro_'.$attribute->getAttribute('value'), $arguments, $node->getTemplateLine());