Return $this for non-static methods with self or static return types for dummies#646
Open
jdreesen wants to merge 1 commit intophpspec:masterfrom
Open
Return $this for non-static methods with self or static return types for dummies#646jdreesen wants to merge 1 commit intophpspec:masterfrom
$this for non-static methods with self or static return types for dummies#646jdreesen wants to merge 1 commit intophpspec:masterfrom
Conversation
…types for dummies Fixes: > TypeError : Double\SomeClass\P12::someMethod(): Return value must be of type Double\SomeClass\P12, null returned
Member
|
This should be implemented in the MethodProphecy when guessing the default return value (like for other types) instead of changing the generated code. |
Contributor
Author
|
I'll take a look at that. Thanks for the feedback. |
Member
|
apparently, you already has a look at it in #645 |
Contributor
Author
|
But as far as I remember, the change in #645 was not enough to make it work 🤔 |
Contributor
Author
|
I think the problem with #645 not being sufficient was that |
Member
|
but then, wouldn't it be an issue for any return type, not just for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the following error for dummies with fluent interface: