Skip to content

Simplify access to class reflections in InClassNode rules.#2514

Merged
ondrejmirtes merged 1 commit intophpstan:1.10.xfrom
mad-briller:in-class-node
Jul 7, 2023
Merged

Simplify access to class reflections in InClassNode rules.#2514
ondrejmirtes merged 1 commit intophpstan:1.10.xfrom
mad-briller:in-class-node

Conversation

@mad-briller
Copy link
Copy Markdown
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
Copy Markdown
Member

Yes! 😊

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

Thank you.

@mad-briller
Copy link
Copy Markdown
Contributor Author

deleting code is my favorite

@ondrejmirtes
Copy link
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

2 participants