Conditions | 9 |
Paths | 6 |
Total Lines | 23 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | protected function init() |
||
31 | { |
||
32 | $this->natures = []; |
||
33 | $this->currencies = []; |
||
34 | $this->title = (string)$this->xmlDoc->Title; |
||
35 | $this->country = (string)$this->xmlDoc->Country; |
||
36 | |||
37 | if (isset($this->xmlDoc->Natures) && |
||
38 | isset($this->xmlDoc->Natures->Nature) && |
||
39 | !empty($this->xmlDoc->Natures->Nature)) { |
||
40 | foreach ($this->xmlDoc->Natures->Nature as $natureXml) { |
||
41 | $this->natures[] = new Nature($this->getOriginalResponse(), $natureXml); |
||
42 | } |
||
43 | } |
||
44 | |||
45 | if (isset($this->xmlDoc->Currencies) && |
||
46 | isset($this->xmlDoc->Currencies->Currency) && |
||
47 | !empty($this->xmlDoc->Currencies->Currency)) { |
||
48 | foreach ($this->xmlDoc->Currencies->Currency as $currencyXml) { |
||
49 | $this->currencies[] = new Currency($this->getOriginalResponse(), $currencyXml); |
||
50 | } |
||
51 | } |
||
52 | } |
||
53 | |||
86 |