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
properties are reported unused even though they are used via union type:
<?phpclass A {
publicfloat$amount;
}
class B {
publicfloat$amount;
}
/** @param A|B $aOrB */functiondoFoo($aOrB): void {
echo$aOrB->amount;
}
functiondoFooBar(A|B$aOrB): void {
echo$aOrB->amount;
}
reports
------ --------------------------------------------------------------------------------------------------------
Line test.php
------ --------------------------------------------------------------------------------------------------------
3 Public property "A::$amount" is never used
💡 Either reduce visibility or annotate it or its class with @api
7 Public property "B::$amount" is never used
💡 Either reduce visibility or annotate it or its class with @api
The text was updated successfully, but these errors were encountered:
properties are reported unused even though they are used via union type:
reports
The text was updated successfully, but these errors were encountered: