Total Complexity | 8 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class MembershipDto |
||
8 | { |
||
9 | private $hourlyRate; |
||
10 | private $membershipStatus; |
||
11 | private $membershipType; |
||
12 | private $targetId; |
||
13 | private $userId; |
||
14 | |||
15 | public static function fromArray(array $data): self |
||
16 | { |
||
17 | return new self( |
||
18 | $data['hourlyRate'] ? HourlyRateDto::fromArray($data['hourlyRate']) : null, |
||
19 | new MembershipEnum($data['membershipStatus']), |
||
20 | $data['membershipType'], |
||
21 | $data['targetId'], |
||
22 | $data['userId'] |
||
23 | ); |
||
24 | } |
||
25 | |||
26 | public function __construct( |
||
38 | } |
||
39 | |||
40 | public function hourlyRate(): ?HourlyRateDto |
||
41 | { |
||
42 | return $this->hourlyRate; |
||
43 | } |
||
44 | |||
45 | public function membershipStatus(): MembershipEnum |
||
48 | } |
||
49 | |||
50 | public function membershipType(): string |
||
51 | { |
||
52 | return $this->membershipType; |
||
53 | } |
||
54 | |||
55 | public function targetId(): string |
||
58 | } |
||
59 | |||
60 | public function userId(): string |
||
63 | } |
||
64 | } |
||
65 |