Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| NotificationStatus | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
20 | |
0.00% |
0 / 1 |
| label | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
20 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Enums; |
| 4 | |
| 5 | enum NotificationStatus: string |
| 6 | { |
| 7 | case Draft = 'draft'; |
| 8 | case Sent = 'sent'; |
| 9 | case Cancelled = 'cancelled'; |
| 10 | |
| 11 | public function label(): string |
| 12 | { |
| 13 | return match ($this) { |
| 14 | self::Draft => 'Rascunho', |
| 15 | self::Sent => 'Enviada', |
| 16 | self::Cancelled => 'Cancelada', |
| 17 | }; |
| 18 | } |
| 19 | } |