| Conditions | 4 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types = 1); |
||
| 25 | 1 | public function resolve(array $classDataArray, ClassMetadata $classMetadata) |
|
| 26 | { |
||
| 27 | // Iterate collection |
||
| 28 | 1 | if (array_key_exists('@attributes', $classDataArray)) { |
|
| 29 | // Iterate collection attribute configurators |
||
| 30 | 1 | foreach ($this->collectionConfigurators as $key => $collectionConfigurator) { |
|
| 31 | // If this is supported collection configurator |
||
| 32 | 1 | if (array_key_exists($key, $classDataArray['@attributes'])) { |
|
| 33 | /** @var ClassConfiguratorInterface $configurator Create instance */ |
||
| 34 | 1 | $configurator = new $collectionConfigurator($classDataArray['@attributes'][$key]); |
|
| 35 | // Fill in class metadata |
||
| 36 | 1 | $configurator->toClassMetadata($classMetadata); |
|
| 37 | } |
||
| 38 | } |
||
| 39 | } |
||
| 40 | |||
| 41 | 1 | return $classMetadata; |
|
| 42 | } |
||
| 43 | |||
| 49 |