Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| ShippingPackagingTypeEnum | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| label | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Domain\ShippingPackaging\Enums; |
| 4 | |
| 5 | enum ShippingPackagingTypeEnum: int |
| 6 | { |
| 7 | case EXPEDITION = 1; |
| 8 | case SEPARATION = 2; |
| 9 | |
| 10 | public function label(): string |
| 11 | { |
| 12 | return match ($this) { |
| 13 | self::EXPEDITION => __('Expedition'), |
| 14 | self::SEPARATION => __('Separation'), |
| 15 | }; |
| 16 | } |
| 17 | } |