Conditions | 6 |
Paths | 32 |
Total Lines | 26 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
88 | 14 | public function toArray($prefix = '') |
|
89 | { |
||
90 | 14 | $result = []; |
|
91 | |||
92 | 14 | if (!empty($this->getStreet())) { |
|
93 | 14 | $result[sprintf('%sstreet', $prefix)] = $this->getStreet(); |
|
94 | } |
||
95 | |||
96 | 14 | if (!empty($this->getCity())) { |
|
97 | 14 | $result[sprintf('%scity', $prefix)] = $this->getCity(); |
|
98 | } |
||
99 | |||
100 | 14 | if (!empty($this->getState())) { |
|
101 | 14 | $result[sprintf('%sstate', $prefix)] = $this->getState(); |
|
102 | } |
||
103 | |||
104 | 14 | if (!empty($this->getZip())) { |
|
105 | 14 | $result[sprintf('%szip', $prefix)] = $this->getZip(); |
|
106 | } |
||
107 | |||
108 | 14 | if (!empty($this->getCountry())) { |
|
109 | 14 | $result[sprintf('%scountry', $prefix)] = $this->getCountry(); |
|
110 | } |
||
111 | |||
112 | 14 | return $result; |
|
113 | } |
||
114 | } |
||
115 |