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
It may be useful to specify the expected return type of Facing functions with: value-of<Facing::ALL>.
This can break many static analyses, because depending on the PHPstan levels, it will carry over if you pass a simple integer into a function accepting just a few values.
I think this option is worth considering, as it could prevent certain runtime errors in the event of an unaccepted value being supplied?
The text was updated successfully, but these errors were encountered:
A better option is likely to just turn Facing into an enum. The PHPStan annotations of that sort have caused a great deal of headaches in the past due to easily lost type information when doing almost anything with the values.
It may be useful to specify the expected return type of Facing functions with:
value-of<Facing::ALL>
.This can break many static analyses, because depending on the PHPstan levels, it will carry over if you pass a simple integer into a function accepting just a few values.
I think this option is worth considering, as it could prevent certain runtime errors in the event of an unaccepted value being supplied?
The text was updated successfully, but these errors were encountered: