| Total Lines | 26 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | public function getValues(): iterable |
||
| 27 | { |
||
| 28 | yield new class implements EnumValueInterface { |
||
| 29 | public function getName(): string |
||
| 30 | { |
||
| 31 | return 'dog'; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getDescription(): ?string |
||
| 35 | { |
||
| 36 | return null; |
||
| 37 | } |
||
| 38 | |||
| 39 | public function getDeprecationReason(): ?string |
||
| 40 | { |
||
| 41 | return null; |
||
| 42 | } |
||
| 43 | |||
| 44 | public function getValue(): mixed |
||
| 45 | { |
||
| 46 | // Any php-value |
||
| 47 | return AnimalEnum::DOG; |
||
| 48 | } |
||
| 49 | }; |
||
| 50 | |||
| 51 | yield new EnumValue(name: 'cat', value: AnimalEnum::CAT); |
||
| 52 | } |
||
| 54 |