Conditions | 3 |
Paths | 4 |
Total Lines | 20 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
59 | public function __construct(\stdClass $oData = null) |
||
60 | { |
||
61 | parent::__construct($oData); |
||
62 | $this->communeId = $oData->GMI; |
||
63 | $this->name = $oData->NAZWA; |
||
64 | $this->typeName = $oData->NAZWA_DOD; |
||
65 | $this->subregionId = $oData->PODREG; |
||
66 | $this->districtId = $oData->POW; |
||
67 | $this->level = $oData->POZIOM; |
||
68 | $this->regionId = $oData->REGION; |
||
69 | $this->communeTypeId = $oData->RODZ; |
||
70 | $this->provinceId = $oData->WOJ; |
||
71 | |||
72 | try { |
||
73 | $this->statusDate = $oData->STAN_NA ? (new \DateTime($oData->STAN_NA))->format('Y-m-d') : null; |
||
74 | } catch (\Exception $e) { |
||
75 | $this->statusDate = null; |
||
76 | } |
||
77 | |||
78 | $this->expandData(); |
||
79 | } |
||
81 |