Conditions | 4 |
Paths | 2 |
Total Lines | 23 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
29 | public function resolve(array $configurationArray, ClassMetadata $classMetadata) |
||
30 | { |
||
31 | // Iterate collection |
||
32 | if (array_key_exists(self::KEY, $configurationArray)) { |
||
33 | $reflectionClass = new \ReflectionClass($classMetadata->className); |
||
34 | |||
35 | // Iterate configured properties |
||
36 | foreach ($configurationArray[self::KEY] as $propertyName => $propertyDataArray) { |
||
37 | $propertyMetadata = $this->resolvePropertyMetadata( |
||
38 | $reflectionClass->getProperty($propertyName), |
||
39 | $classMetadata |
||
40 | ); |
||
41 | |||
42 | // Process attributes |
||
43 | foreach ($this->getAttributeConfigurator($propertyDataArray) as $configurator) { |
||
44 | /** @var PropertyConfiguratorInterface $configurator Parse property metadata */ |
||
45 | $configurator->toPropertyMetadata($propertyMetadata); |
||
46 | } |
||
47 | } |
||
48 | } |
||
49 | |||
50 | return $classMetadata; |
||
51 | } |
||
52 | } |
||
53 |