/** * @extends Enum<int> */class MyEnum extends Enum
{
publicconstFOO = 1;
publicconstBAR = 2;
publicfunctiongetLabel(): string {
returnmatch ($this->value) {
self::FOO => 'foo-value',
self::BAR => 'bar-value',
};
}
}Will output errors because it phpstan consider that values from ]-ING;0] and [3;+INF] are not checked.
Example:
Will output errors because it phpstan consider that values from ]-ING;0] and [3;+INF] are not checked.