Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
93 | 2 | public function toArray() |
|
94 | { |
||
95 | $data = [ |
||
96 | 2 | 'type' => $this->getType(), |
|
97 | 2 | 'external_id' => $this->getExternalId(), |
|
98 | 2 | 'source' => $this->getSource(), |
|
99 | ]; |
||
100 | |||
101 | 2 | if ($this->getBlockId()) { |
|
102 | 1 | $data['block_id'] = $this->getBlockId(); |
|
103 | } |
||
104 | |||
105 | 2 | return $data; |
|
106 | } |
||
108 |