-
Notifications
You must be signed in to change notification settings - Fork 506
implement FunctionReflection/ExtendedMethodReflection returnsByReference() #1899
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
Conversation
88e6eb6
to
9407908
Compare
src/Analyser/MutatingScope.php
Outdated
@@ -2563,6 +2563,7 @@ public function enterClassMethod( | |||
$selfOutType, | |||
$phpDocComment, | |||
array_map(static fn (Type $type): Type => TemplateTypeHelper::toArgument($type), $parameterOutTypes), | |||
null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since return-by-reference cannot be annotated by phpdocs only, I just ignore phpdocs regarding return-by-reference
This pull request has been marked as ready for review. |
7055b05
to
0801d7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you get back to this one, first thing to change is that returnsByReference
returns TrinaryLogic. This is necessary for unions and intersections.
0801d7c
to
b03ee94
Compare
done |
c924605
to
c544d7f
Compare
This pull request has been marked as ready for review. |
c544d7f
to
5cce436
Compare
I tried adding tests for the case of unknown-functions, classes, and/or methods:
these run into a exception right now... should this exception be catched and |
5cce436
to
17f268d
Compare
3c584e2
to
1c57728
Compare
1c57728
to
509b5b8
Compare
Thank you! |
thanks for the in-detail review @ondrejmirtes. much appreciated. |
closes phpstan/phpstan#6005