Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
OwnerContactChannel
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
1 / 1
4
100.00% covered (success)
100.00%
1 / 1
 label
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
1 / 1
4
1<?php
2
3declare(strict_types=1);
4
5namespace ImovelZapAi\Owners\Domain\Enums;
6
7enum OwnerContactChannel: string
8{
9    case Phone = 'phone';
10    case Email = 'email';
11    case WhatsApp = 'whatsapp';
12
13    public function label(): string
14    {
15        return match ($this) {
16            self::Phone => 'Telefone',
17            self::Email => 'E-mail',
18            self::WhatsApp => 'WhatsApp',
19        };
20    }
21}