Conditions | 2 |
Paths | 2 |
Total Lines | 23 |
Code Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
42 | public function __construct($json) |
||
43 | { |
||
44 | $this->id = $json->id; |
||
45 | $this->status = $json->status; |
||
46 | $this->comment = $json->comment; |
||
47 | if (isset($json->data)) { |
||
48 | $data = $json->data; |
||
49 | $this->shortName = $data->organizationShortName; |
||
50 | $this->fullName = $data->organizationFullName ?? null; |
||
51 | $this->ogrn = $data->OGRN ?? null; |
||
52 | $this->ogrnip = $data->OGRNIP ?? null; |
||
53 | $this->inn = $data->INN; |
||
54 | $this->kpp = $data->KPP ?? null; |
||
55 | $this->address = new Address(); |
||
56 | $this->address->region = $data->region ?? null; |
||
57 | $this->address->city = $data->city ?? null; |
||
58 | $this->address->street = $data->street ?? null; |
||
59 | $this->address->raw = $data->fiasAddress ?? null; |
||
60 | $this->head = new Person(); |
||
61 | $this->head->firstName = $data->headFirstName; |
||
62 | $this->head->middleName = $data->headMiddleName; |
||
63 | $this->head->lastName = $data->headLastName; |
||
64 | $this->head->jobName = $data->headPosition ?? null; |
||
65 | } |
||
67 | } |