Total Complexity | 5 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | final class IncomeClient implements \JsonSerializable |
||
12 | { |
||
13 | private ?string $contactPhone; |
||
14 | private ?string $displayName; |
||
15 | private string $incomeType; |
||
16 | private ?string $inn; |
||
17 | |||
18 | public function __construct( |
||
19 | ?string $contactPhone = null, |
||
20 | ?string $displayName = null, |
||
21 | string $incomeType = IncomeType::INDIVIDUAL, |
||
22 | ?string $inn = null |
||
23 | ) { |
||
24 | $this->contactPhone = $contactPhone; |
||
25 | $this->displayName = $displayName; |
||
26 | $this->incomeType = $incomeType; |
||
27 | $this->inn = $inn; |
||
28 | } |
||
29 | |||
30 | public function jsonSerialize(): array |
||
31 | { |
||
32 | return [ |
||
33 | 'contactPhone' => $this->contactPhone, |
||
34 | 'displayName' => $this->displayName, |
||
35 | 'incomeType' => $this->incomeType, |
||
36 | 'inn' => $this->inn, |
||
37 | ]; |
||
38 | } |
||
39 | |||
40 | public function getInn(): ?string |
||
41 | { |
||
42 | return $this->inn; |
||
43 | } |
||
44 | |||
45 | public function getIncomeType(): string |
||
46 | { |
||
47 | return $this->incomeType; |
||
48 | } |
||
49 | |||
50 | public function getDisplayName(): ?string |
||
53 | } |
||
54 | } |
||
55 |