|
@@ -424,7 +424,7 @@ class Foo
|
|
|
// and it is not a `Foo::{bar}()` situation
|
|
|
!($nestToken->equals('}') && $nextNonWhitespaceNestToken->equals('(')) &&
|
|
|
// and it is not a `${"a"}->...` and `${"b{$foo}"}->...` situation
|
|
|
- !($nestToken->equals('}') && $tokens[$nestIndex - 1]->equalsAny(['"', "'", [T_CONSTANT_ENCAPSED_STRING]])) &&
|
|
|
+ !($nestToken->equals('}') && $tokens[$nestIndex - 1]->equalsAny(['"', "'", [T_CONSTANT_ENCAPSED_STRING], [T_VARIABLE]])) &&
|
|
|
// and next token is not a closing tag that would break heredoc/nowdoc syntax
|
|
|
!($tokens[$nestIndex - 1]->isGivenKind(T_END_HEREDOC) && $nextNonWhitespaceNestToken->isGivenKind(T_CLOSE_TAG))
|
|
|
) {
|