Skip to content

Commit 222eb3c

Browse files
committed
Apply operator_linebreak PHP-CS-Fixer rule
1 parent 116d5c9 commit 222eb3c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Parser.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ public function parsePostfixExpression(Node\Node $node)
365365

366366
if (
367367
Token::NAME_TYPE !== $token->type
368-
&&
369368
// Operators like "not" and "matches" are valid method or property names,
370369
//
371370
// In other words, besides NAME_TYPE, OPERATOR_TYPE could also be parsed as a property or method.
@@ -377,7 +376,7 @@ public function parsePostfixExpression(Node\Node $node)
377376
// Other types, such as STRING_TYPE and NUMBER_TYPE, can't be parsed as property nor method names.
378377
//
379378
// As a result, if $token is NOT an operator OR $token->value is NOT a valid property or method name, an exception shall be thrown.
380-
(Token::OPERATOR_TYPE !== $token->type || !preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A', $token->value))
379+
&& (Token::OPERATOR_TYPE !== $token->type || !preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A', $token->value))
381380
) {
382381
throw new SyntaxError('Expected name.', $token->cursor, $this->stream->getExpression());
383382
}

0 commit comments

Comments
 (0)