/**
* @extends Enum<int>
*/
class MyEnum extends Enum
{
public const FOO = 1;
public const BAR = 2;
public function getLabel(): string {
return match ($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.