Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
VisitPurpose
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 2
42
0.00% covered (danger)
0.00%
0 / 1
 label
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
30
 values
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3declare(strict_types=1);
4
5namespace ImovelZapAi\Visits\Domain\Enums;
6
7enum VisitPurpose: string
8{
9    case BuyerVisit = 'buyer_visit';
10    case ListingEvaluation = 'listing_evaluation';
11    case Inspection = 'inspection';
12    case OwnerMeeting = 'owner_meeting';
13
14    public function label(): string
15    {
16        return match ($this) {
17            self::BuyerVisit => 'Visita de comprador',
18            self::ListingEvaluation => 'Visita de avaliação',
19            self::Inspection => 'Vistoria',
20            self::OwnerMeeting => 'Reunião com proprietário',
21        };
22    }
23
24    /** @return list<string> */
25    public static function values(): array
26    {
27        return array_map(static fn (self $c) => $c->value, self::cases());
28    }
29}