| Conditions | 5 | 
| Paths | 16 | 
| Total Lines | 24 | 
| Code Lines | 12 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 12 | 
| CRAP Score | 5 | 
| Changes | 1 | ||
| Bugs | 1 | Features | 0 | 
| 1 | <?php | ||
| 50 | 10 | public function toArray(): array | |
| 51 |     { | ||
| 52 | $request = [ | ||
| 53 | 10 | 'name' => $this->name, | |
| 54 | 10 | 'type' => $this->type, | |
| 55 | ]; | ||
| 56 | |||
| 57 | 10 |         if ($this->description ?? null) { | |
| 58 | 9 | $request['description'] = $this->description; | |
| 59 | } | ||
| 60 | |||
| 61 | 10 |         if ($this->category ?? null) { | |
| 62 | 9 | $request['category'] = $this->category; | |
| 63 | } | ||
| 64 | |||
| 65 | 10 |         if ($this->imageUrl ?? null) { | |
| 66 | 9 | $request['image_url'] = $this->imageUrl; | |
| 67 | } | ||
| 68 | |||
| 69 | 10 |         if ($this->homeUrl ?? null) { | |
| 70 | 9 | $request['home_url'] = $this->homeUrl; | |
| 71 | } | ||
| 72 | |||
| 73 | 10 | return $request; | |
| 74 | } | ||
| 76 |