Set class and method reflection in the MethodReturnStatementNode.#2515
Conversation
|
You've opened the pull request against the latest branch 1.11.x. If your code is relevant on 1.10.x and you want it to be released sooner, please rebase your pull request and change its target to 1.10.x. |
4ee3018 to
e394afd
Compare
|
not sure if github is broken atm but i can't seem to change the target to |
src/Analyser/NodeScopeResolver.php
Outdated
There was a problem hiding this comment.
not sure if this is the best way to get the reflections to pass into the node
18fa72f to
d0c3fa6
Compare
ondrejmirtes
left a comment
There was a problem hiding this comment.
MethodReturnStatementsNode is read in NodeScopeResolver around line 4417, we could access ClassReflection on $node instead of $scope there too :)
src/Analyser/NodeScopeResolver.php
Outdated
There was a problem hiding this comment.
You could do this on $scope and then you don't need to check for null - because of if (!$scope->isInClass()) { on line 526.
There was a problem hiding this comment.
is the isInClass thing a custom type-specifier in phpstan?
There was a problem hiding this comment.
Not anymore, it just has @phpstan-assert above it.
There was a problem hiding this comment.
ah i didn't know they could do that, nice
d0c3fa6 to
1b06588
Compare
|
Thank you! |
Is this what you meant by #2514 (comment) ?