Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| NotificationRecipientStatus | |
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 | namespace App\Enums; |
| 4 | |
| 5 | enum NotificationRecipientStatus: string |
| 6 | { |
| 7 | case Delivered = 'delivered'; |
| 8 | case Read = 'read'; |
| 9 | |
| 10 | public function label(): string |
| 11 | { |
| 12 | return match ($this) { |
| 13 | self::Delivered => 'Entregue', |
| 14 | self::Read => 'Lida', |
| 15 | }; |
| 16 | } |
| 17 | } |