Conditions | 5 |
Paths | 16 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
118 | 1 | public function toArray() |
|
119 | { |
||
120 | 1 | $data = []; |
|
121 | 1 | if ($this->name !== null) { |
|
122 | 1 | $data['name'] = $this->name; |
|
123 | } |
||
124 | 1 | if ($this->email !== null) { |
|
125 | 1 | $data['email'] = $this->email; |
|
126 | } |
||
127 | 1 | if ($this->phone !== null) { |
|
128 | 1 | $data['phone'] = $this->phone; |
|
129 | } |
||
130 | |||
131 | 1 | if ($this->www !== null) { |
|
132 | 1 | $data['www'] = $this->www; |
|
133 | } |
||
134 | |||
135 | 1 | return $data; |
|
136 | } |
||
137 | |||
156 |