Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| PaymentStatus | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
4 | |
100.00% |
1 / 1 |
| label | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
4 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace ImovelZapAi\Financial\Domain\Enums; |
| 6 | |
| 7 | enum PaymentStatus: string |
| 8 | { |
| 9 | case Pending = 'pending'; |
| 10 | case Confirmed = 'confirmed'; |
| 11 | case Cancelled = 'cancelled'; |
| 12 | |
| 13 | public function label(): string |
| 14 | { |
| 15 | return match ($this) { |
| 16 | self::Pending => 'Pendente', |
| 17 | self::Confirmed => 'Confirmado', |
| 18 | self::Cancelled => 'Cancelado', |
| 19 | }; |
| 20 | } |
| 21 | } |