| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | 1 | public function process(PropertyDefinition $propertyDefinition, ClassDefinition $classDefinition, array $propertyData, array $classList): void |
|
| 27 | { |
||
| 28 | 1 | $types = $propertyDefinition->getTypes(); |
|
| 29 | 1 | foreach ($types as $pos => $type) { |
|
| 30 | 1 | if (!\in_array($type, $classList, true)) { |
|
| 31 | 1 | continue; |
|
| 32 | } |
||
| 33 | |||
| 34 | 1 | $classType = $this->classMetadataHelper->generateClassname($type); |
|
| 35 | 1 | $classDefinition->addUseStatement($classType); |
|
| 36 | 1 | $types[$pos] = $classType; |
|
| 37 | } |
||
| 38 | |||
| 39 | 1 | $propertyDefinition->setTypes(array_unique($types)); |
|
| 40 | } |
||
| 42 |