thunderer /
Platenum
| 1 | <?php |
||
| 2 | declare(strict_types=1); |
||
| 3 | namespace Thunder\Platenum\Tests\Psalm; |
||
| 4 | |||
| 5 | use Thunder\Platenum\Enum\ConstantsEnumTrait; |
||
| 6 | |||
| 7 | /** |
||
| 8 | * @method static static SPRING() |
||
| 9 | * @method static static SUMMER() |
||
| 10 | * @method static static AUTUMN() |
||
| 11 | * @method static static WINTER() |
||
| 12 | */ |
||
| 13 | final class SeasonsTrait |
||
| 14 | { |
||
| 15 | private const SPRING = 1; |
||
| 16 | private const SUMMER = 2; |
||
| 17 | private const AUTUMN = 3; |
||
| 18 | private const WINTER = 4; |
||
| 19 | |||
| 20 | /** @use ConstantsEnumTrait<'SPRING'|'SUMMER'|'AUTUMN'|'WINTER',SeasonsTrait::*> */ |
||
| 21 | use ConstantsEnumTrait; |
||
| 22 | } |
||
| 23 | |||
| 24 | $spring = SeasonsTrait::SPRING(); |
||
| 25 | /** @psalm-suppress InvalidArgument */ |
||
| 26 | $spring->hasMember('INVALID'); |
||
| 27 | /** @psalm-suppress InvalidArgument */ |
||
| 28 | $spring->hasValue(9); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 29 |