Replies: 1 comment
-
I don't see how it could be checked without changing the definition of Possibly you could introduce a template variable to carry the state and then make assertions based on that, e.g. https://psalm.dev/r/4f349032a2 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
e.g. https://psalm.dev/r/0d7a047291
This won't do anything because $l->save() wasn't called.
How can I make psalm give an error if a specific method "add" is called, that it should require a call to "save"?
In cases like this it's very obvious, but it sometimes gets forgotten in some code paths or when refactoring.
Beta Was this translation helpful? Give feedback.
All reactions