Skip to content
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

[Prophecy][False Positive] Argument::that problems #72

Closed
mr-feek opened this issue May 24, 2020 · 1 comment · Fixed by #73
Closed

[Prophecy][False Positive] Argument::that problems #72

mr-feek opened this issue May 24, 2020 · 1 comment · Fixed by #73

Comments

@mr-feek
Copy link
Contributor

mr-feek commented May 24, 2020

InvalidArgument - tests/Feature/Cart/CartItems/GSuiteCartItemTest.php:87:122 - Argument 1 of Prophecy\Argument::that expects callable():bool, Closure(mixed):bool provided

The callable passed to Argument::that is allowed to have parameters I believe. If I delete the stub entirely, my test passes however then we lose the benefit of the bool typehint.

How do we inform psalm that any # of mixed params can be parameters of the callable?

@mr-feek
Copy link
Contributor Author

mr-feek commented May 24, 2020

here's a test case and proposed fix https://psalm.dev/r/94f518d6c4

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 a pull request may close this issue.

1 participant