Conditions | 3 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
97 | 16 | protected function toArray() |
|
98 | { |
||
99 | 16 | $result = []; |
|
100 | |||
101 | 16 | if (!empty($this->fromAddress)) { |
|
102 | 14 | $result = array_merge($result, $this->fromAddress->toArray('from_')); |
|
103 | } |
||
104 | |||
105 | 16 | if (!empty($this->toAddress)) { |
|
106 | 14 | $result = array_merge($result, $this->toAddress->toArray('to_')); |
|
107 | } |
||
108 | |||
109 | 16 | $result = array_merge($result, [ |
|
110 | 16 | 'amount' => $this->getAmount(), |
|
111 | 16 | 'shipping' => $this->getShipping(), |
|
112 | ]); |
||
113 | |||
114 | 16 | return $result; |
|
115 | } |
||
116 | } |
||
117 |