Conditions | 3 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
92 | 5 | public function toArray() |
|
93 | { |
||
94 | 5 | $actionArray = []; |
|
95 | |||
96 | 5 | $actionArray['actionCode'] = $this->actionCode; |
|
97 | |||
98 | 5 | if (isset($this->item)) { |
|
99 | 3 | $actionArray['item'] = $this->item->toArray(); |
|
100 | 3 | } |
|
101 | 5 | if (! empty($this->categories)) { |
|
102 | 2 | $actionArray['categories'] = $this->categories; |
|
103 | 2 | } |
|
104 | |||
105 | 5 | return $actionArray; |
|
106 | } |
||
107 | } |
||
108 |