| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2.032 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | 3 | public function process(PropertyDefinition $propertyDefinition, ClassDefinition $classDefinition, array $propertyData, array $classList): void |
|
| 23 | { |
||
| 24 | 3 | $propertyName = $propertyData[PreparationProcessorInterface::PROP_NAME]; |
|
| 25 | |||
| 26 | 3 | if (!preg_match('/^\w+$/i', $propertyName)) { |
|
| 27 | throw new \RuntimeException(sprintf('Invalid property name "%s"', $propertyName)); |
||
| 28 | } |
||
| 29 | |||
| 30 | 3 | $propertyDefinition->setName($propertyName); |
|
| 31 | } |
||
| 33 |