| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 37 | 1 | public function toArray(): array |
|
| 38 | { |
||
| 39 | 1 | $result = ['type' => 'json']; |
|
| 40 | |||
| 41 | 1 | if (!empty($this->flattenSpec)) { |
|
| 42 | 1 | $result['flattenSpec'] = $this->flattenSpec->toArray(); |
|
| 43 | } |
||
| 44 | |||
| 45 | 1 | if (!empty($this->features)) { |
|
| 46 | 1 | $result['featureSpec'] = $this->features; |
|
| 47 | } |
||
| 48 | |||
| 49 | 1 | return $result; |
|
| 50 | } |
||
| 51 | } |