Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| BillingCycle | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
3 | |
100.00% |
1 / 1 |
| label | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
3 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace ImovelZapAi\Billing\Domain\Enums; |
| 6 | |
| 7 | enum BillingCycle: string |
| 8 | { |
| 9 | case Monthly = 'monthly'; |
| 10 | case Yearly = 'yearly'; |
| 11 | |
| 12 | public function label(): string |
| 13 | { |
| 14 | return match ($this) { |
| 15 | self::Monthly => 'Mensal', |
| 16 | self::Yearly => 'Anual', |
| 17 | }; |
| 18 | } |
| 19 | } |