File tree Expand file tree Collapse file tree 1 file changed +3
-27
lines changed
Expand file tree Collapse file tree 1 file changed +3
-27
lines changed Original file line number Diff line number Diff line change @@ -3762,36 +3762,12 @@ private function enterAnonymousFunctionWithoutReflection(
37623762 foreach ($ nonStaticExpressions as $ exprString => $ typeHolder ) {
37633763 $ expr = $ typeHolder ->getExpr ();
37643764
3765- if (
3766- !$ expr instanceof PropertyFetch
3767- ) {
3765+ if (!$ expr instanceof PropertyFetch) {
37683766 continue ;
37693767 }
37703768
3771- while ($ expr instanceof PropertyFetch) {
3772- if ($ expr ->var instanceof Variable) {
3773- if (
3774- ! $ expr ->name instanceof Node \Identifier
3775- || !is_string ($ expr ->var ->name )
3776- || $ expr ->var ->name !== 'this '
3777- ) {
3778- continue 2 ;
3779- }
3780- } elseif (!$ expr ->var instanceof PropertyFetch) {
3781- continue 2 ;
3782- }
3783-
3784- $ propertyReflection = $ this ->propertyReflectionFinder ->findPropertyReflectionFromNode ($ expr , $ this );
3785- if ($ propertyReflection === null ) {
3786- continue 2 ;
3787- }
3788-
3789- $ nativePropertyReflection = $ propertyReflection ->getNativeReflection ();
3790- if ($ nativePropertyReflection === null || !$ nativePropertyReflection ->isReadOnly ()) {
3791- continue 2 ;
3792- }
3793-
3794- $ expr = $ expr ->var ;
3769+ if (!$ this ->isReadonlyPropertyFetchOnThis ($ expr )) {
3770+ continue ;
37953771 }
37963772
37973773 $ expressionTypes [$ exprString ] = $ typeHolder ;
You can’t perform that action at this time.
0 commit comments