Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CodingStyle] Skip anonymous class on MakeInheritedMethodVisibilitySameAsParentRector #5688

Merged
merged 2 commits into from Mar 4, 2024

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik commented Mar 4, 2024

anonymous class may be used for testing, so I think it needs to be skipped, eg:

$obj = new class extends ParentWithProtectedMethod {
            public function run()
            {
                return 1;
            }
        };

$this->assertSame(1, $obj->run());

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it ;)

@samsonasik samsonasik merged commit 8c52d61 into main Mar 4, 2024
41 checks passed
@samsonasik samsonasik deleted the skip-anonymous branch March 4, 2024 21:31
arjenschol pushed a commit to arjenschol/rector-src that referenced this pull request Mar 6, 2024
…meAsParentRector (rectorphp#5688)

* [CodingStyle] Skip anonymous class on MakeInheritedMethodVisibilitySameAsParentRector

* fix
arjenschol pushed a commit to arjenschol/rector-src that referenced this pull request Mar 7, 2024
…meAsParentRector (rectorphp#5688)

* [CodingStyle] Skip anonymous class on MakeInheritedMethodVisibilitySameAsParentRector

* fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant