Some code style fixes

This commit is contained in:
Den
2021-04-16 18:50:36 +03:00
committed by Fabien Potencier
parent 32d72de188
commit 17c6371fb5
10 changed files with 13 additions and 14 deletions
+3 -1
View File
@@ -255,7 +255,9 @@ class ExpressionParser
$this->parser->getStream()->next();
$node = new NameExpression($token->getValue(), $token->getLine());
break;
} elseif (isset($this->unaryOperators[$token->getValue()])) {
}
if (isset($this->unaryOperators[$token->getValue()])) {
$class = $this->unaryOperators[$token->getValue()]['class'];
if (!\in_array($class, [NegUnary::class, PosUnary::class])) {
throw new SyntaxError(sprintf('Unexpected unary operator "%s".', $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext());