Conditions | 4 |
Paths | 8 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
90 | 2 | public function toArray() |
|
91 | { |
||
92 | 2 | $data = []; |
|
93 | 2 | if ($this->name !== null) { |
|
94 | 2 | $data['name'] = $this->name; |
|
95 | } |
||
96 | 2 | if ($this->email !== null) { |
|
97 | 2 | $data['email'] = $this->email; |
|
98 | } |
||
99 | 2 | if ($this->phone !== null) { |
|
100 | 2 | $data['phone'] = $this->phone; |
|
101 | } |
||
102 | |||
103 | 2 | return $data; |
|
104 | } |
||
105 | |||
123 |