You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This has been brought up before partially (#554).
PHPStan gives anonymous class nodes a name to generalize behavior between anonymous and regular classes.
As pointed out before, this does of course break PhpParser\Node\Stmt\Class_::isAnonymous().
We can resolve this by extending Class_ and overriding the method to always return true. (as implemented here phpstan/phpstan-src#3343), but it feels a bit cumbersome to do.
So here I'm mainly wondering what your opinion is on changing Class_::isAnoynmous() to use e.g. a new "is anonymous" flag or similar.
The text was updated successfully, but these errors were encountered:
Hi
This has been brought up before partially (#554).
PHPStan gives anonymous class nodes a name to generalize behavior between anonymous and regular classes.
As pointed out before, this does of course break
PhpParser\Node\Stmt\Class_::isAnonymous()
.We can resolve this by extending
Class_
and overriding the method to always returntrue
. (as implemented here phpstan/phpstan-src#3343), but it feels a bit cumbersome to do.So here I'm mainly wondering what your opinion is on changing
Class_::isAnoynmous()
to use e.g. a new "is anonymous" flag or similar.The text was updated successfully, but these errors were encountered: