You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking for this feature as well, and this would be helpful for every method. Your example is precisely my use case. The fluent notation makes it much more cleaner to use. Your current PR is only the notNull method. Is your intention to add this to all methods? Otherwise I could also extend on this PR.
@frankdekker, I will add support for other methods as well if the maintainer accepts that such a feature is required. We should wait for @webmozart's reply.
I've faced the fact that it is required to create temporary variables to validate values:
We can rid of temporary variables if the assertion function returns a valid value:
For some of the assertion functions, we can simply return the valid value. The changes should be BC-safe.
Possible implementation: #281
Psalm support demonstration: https://psalm.dev/r/a439359976
References:
The text was updated successfully, but these errors were encountered: