| Conditions | 5 |
| Paths | 5 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | protected function parseConfig(array $config): array |
||
| 41 | { |
||
| 42 | $result = []; |
||
| 43 | foreach ($config as $key => $type) { |
||
| 44 | if (\is_array($type)) { |
||
| 45 | if ($arrayOfType = $this->factory->checkArrayOfType($type)) { |
||
| 46 | $result[$key] = $arrayOfType; |
||
| 47 | } else { |
||
| 48 | $result[$key] = new self($type, $this->factory, $this->strict); |
||
| 49 | } |
||
| 50 | } elseif ($type instanceof CastInterface) { |
||
| 51 | $result[$key] = $type; |
||
| 52 | } else { |
||
| 53 | $result[$key] = $this->factory->createType($type); |
||
| 54 | } |
||
| 55 | } |
||
| 56 | |||
| 57 | return $result; |
||
| 58 | } |
||
| 87 |