-
Notifications
You must be signed in to change notification settings - Fork 46
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
[Feature request] Report willReturn values incompatible with method signature #48
Comments
This is a good idea. Can you take a look at it? |
Here we would have 3 involved parts:
I have no idea where to start a Rule like this. Anything similar you can point us out? |
After: $class = $this->createMock(MyClass::class);
Then you'd need to write another dynamic return type extension that makes sure that methods called on Also, Finally, you'd be able to write a rule that checks that calling You should check out phpstan-doctrine (https://github.com/phpstan/phpstan-doctrine/tree/master/src/Type/Doctrine/QueryBuilder), there's a lot of similar code that analyses DQLs. |
Great help 👍 |
Given
PHPUnit reports:
It would be awesome if PHPStan could report this errors too.
The text was updated successfully, but these errors were encountered: