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
Option::fromValue uses the same type parameter C for the $value and $noneValue parameters. As a result, the type of C is inferred to a union of the types of $value and $noneValue:
Option::fromValue
uses the same type parameterC
for the$value
and$noneValue
parameters. As a result, the type ofC
is inferred to a union of the types of$value
and$noneValue
:https://phpstan.org/r/af2d3270-93fe-463a-9a29-4dd584012cc3
Typing
$noneValue
tomixed
fixes the problem:https://phpstan.org/r/c105ea3e-21e2-4dbc-a119-36fd1154ef3e
I believe that this would be ok since
$noneValue
doesn't contribute to type of Option.The text was updated successfully, but these errors were encountered: