| Conditions | 4 |
| Paths | 8 |
| Total Lines | 15 |
| 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 (null !== $this->name) { |
|
| 94 | 2 | $data['name'] = $this->name; |
|
| 95 | } |
||
| 96 | 2 | if (null !== $this->email) { |
|
| 97 | 2 | $data['email'] = $this->email; |
|
| 98 | } |
||
| 99 | 2 | if (null !== $this->phone) { |
|
| 100 | 2 | $data['phone'] = $this->phone; |
|
| 101 | } |
||
| 102 | |||
| 103 | 2 | return $data; |
|
| 104 | } |
||
| 105 | |||
| 123 |