Conditions | 4 |
Paths | 8 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
92 | public function toArray() |
||
93 | { |
||
94 | $data = []; |
||
95 | if (null !== $this->createdAt) { |
||
96 | $data['created_at'] = $this->createdAt->getTimestamp(); |
||
97 | } |
||
98 | if (null !== $this->type) { |
||
99 | $data['type'] = $this->type; |
||
100 | } |
||
101 | if (null !== $this->data) { |
||
102 | $data['data'] = $this->data->toArray(); |
||
103 | } |
||
104 | |||
105 | return $data; |
||
106 | } |
||
107 | |||
125 |