| Conditions | 5 |
| Paths | 16 |
| Total Lines | 21 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 5 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | 3 | public function toArray(): array |
|
| 37 | { |
||
| 38 | 3 | $data = ['contact_fname' => $this->firstName]; |
|
| 39 | |||
| 40 | 3 | if ($this->lastName) { |
|
| 41 | 3 | $data['contact_lname'] = $this->lastName; |
|
| 42 | } |
||
| 43 | |||
| 44 | 3 | if ($this->email) { |
|
| 45 | 3 | $data['contact_email'] = $this->email; |
|
| 46 | } |
||
| 47 | |||
| 48 | 3 | if ($this->address) { |
|
| 49 | 3 | $data['contact_address'] = $this->address; |
|
| 50 | } |
||
| 51 | |||
| 52 | 3 | if ($this->group) { |
|
| 53 | 3 | $data['contact_group'] = $this->group; |
|
| 54 | } |
||
| 55 | |||
| 56 | 3 | return $data; |
|
| 57 | } |
||
| 59 |