| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 34 | 3 | #[ArrayShape(['type' => "string", 'values' => "array"])] |
|
| 35 | public function toArray(): array |
||
| 36 | { |
||
| 37 | 3 | $values = []; |
|
| 38 | 3 | foreach ($this->getValues() as $value) { |
|
| 39 | 3 | $values[] = $value->toArray(); |
|
| 40 | } |
||
| 41 | |||
| 42 | return [ |
||
| 43 | 3 | 'type' => $this->getType(), |
|
| 44 | 3 | 'values' => $values, |
|
| 45 | ]; |
||
| 59 |