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

Simplify access to class reflections in InClassNode rules. #2514

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

mad-briller
Copy link
Contributor

InClassNodes are guaranteed to be inside classes and can access the class reflection safely through the node instead of unsafely through the scope

@ondrejmirtes
Copy link
Member

Yes! 😊

@ondrejmirtes ondrejmirtes merged commit dabbd59 into phpstan:1.10.x Jul 7, 2023
405 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

@mad-briller
Copy link
Contributor Author

deleting code is my favorite

@ondrejmirtes
Copy link
Member

There are more opportunities like that, for example MethodReturnStatementsNode. It could have ClassReflection and MethodReflection inside but currently doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants