Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
13 / 13 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| DocumentType | |
100.00% |
13 / 13 |
|
100.00% |
2 / 2 |
12 | |
100.00% |
1 / 1 |
| label | |
100.00% |
12 / 12 |
|
100.00% |
1 / 1 |
11 | |||
| acceptsClientDecision | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace ImovelZapAi\Documents\Domain\Enums; |
| 6 | |
| 7 | enum DocumentType: string |
| 8 | { |
| 9 | case ProposalSale = 'proposal_sale'; |
| 10 | case ProposalRent = 'proposal_rent'; |
| 11 | case ListingAgreement = 'listing_agreement'; |
| 12 | case Exclusivity = 'exclusivity'; |
| 13 | case Receipt = 'receipt'; |
| 14 | case VisitAuthorization = 'visit_authorization'; |
| 15 | case Declaration = 'declaration'; |
| 16 | case Term = 'term'; |
| 17 | case RegistrationForm = 'registration_form'; |
| 18 | case Custom = 'custom'; |
| 19 | |
| 20 | public function label(): string |
| 21 | { |
| 22 | return match ($this) { |
| 23 | self::ProposalSale => 'Proposta de compra', |
| 24 | self::ProposalRent => 'Proposta de locação', |
| 25 | self::ListingAgreement => 'Contrato de captação', |
| 26 | self::Exclusivity => 'Contrato de exclusividade', |
| 27 | self::Receipt => 'Recibo', |
| 28 | self::VisitAuthorization => 'Autorização de visita', |
| 29 | self::Declaration => 'Declaração', |
| 30 | self::Term => 'Termo / reserva', |
| 31 | self::RegistrationForm => 'Ficha cadastral', |
| 32 | self::Custom => 'Documento personalizado', |
| 33 | }; |
| 34 | } |
| 35 | |
| 36 | public function acceptsClientDecision(): bool |
| 37 | { |
| 38 | return in_array($this, [self::ProposalSale, self::ProposalRent], true); |
| 39 | } |
| 40 | } |