| Total Complexity | 13 |
| Total Lines | 69 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | final class RosfinItem |
||
| 8 | { |
||
| 9 | private const TYPE_PERSON = 4; |
||
| 10 | |||
| 11 | private $data; |
||
| 12 | |||
| 13 | public static function fromArray(array $data): self |
||
| 14 | { |
||
| 15 | return new self($data); |
||
| 16 | } |
||
| 17 | |||
| 18 | public function id(): int |
||
| 19 | { |
||
| 20 | return $this->data['id']; |
||
| 21 | } |
||
| 22 | |||
| 23 | public function type(): int |
||
| 26 | } |
||
| 27 | |||
| 28 | public function person(): bool |
||
| 29 | { |
||
| 30 | return self::TYPE_PERSON === $this->type(); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function fullName(): array |
||
| 34 | { |
||
| 35 | return $this->data['fullName']; |
||
| 36 | } |
||
| 37 | |||
| 38 | public function birthDate(): ?string |
||
| 39 | { |
||
| 40 | return $this->data['birthDate'] ?? null; |
||
| 41 | } |
||
| 42 | |||
| 43 | public function birthPlace(): ?string |
||
| 44 | { |
||
| 45 | return $this->data['birthPlace'] ?? null; |
||
| 46 | } |
||
| 47 | |||
| 48 | public function description(): ?string |
||
| 49 | { |
||
| 50 | return $this->data['description'] ?? null; |
||
| 51 | } |
||
| 52 | |||
| 53 | public function address(): ?string |
||
| 54 | { |
||
| 55 | return $this->data['address'] ?? null; |
||
| 56 | } |
||
| 57 | |||
| 58 | public function resolution(): ?string |
||
| 61 | } |
||
| 62 | |||
| 63 | public function passport(): ?string |
||
| 64 | { |
||
| 65 | return $this->data['passport'] ?? null; |
||
| 66 | } |
||
| 67 | |||
| 68 | public function toArray(): array |
||
| 71 | } |
||
| 72 | |||
| 73 | private function __construct(array $data) |
||
| 74 | { |
||
| 75 | $this->data = $data; |
||
| 76 | } |
||
| 77 | } |
||
| 78 |