| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | 6 | protected function register(Registry $registry, Entity $entity): void |
|
| 29 | { |
||
| 30 | 6 | $role = $entity->getRole(); |
|
| 31 | assert($role !== null); |
||
| 32 | 6 | foreach ($entity->getSchemaModifiers() as $modifier) { |
|
| 33 | \assert($modifier instanceof SchemaModifierInterface); |
||
| 34 | try { |
||
| 35 | 6 | $modifier->compute($registry); |
|
| 36 | 4 | } catch (SchemaModifierException $e) { |
|
| 37 | 4 | throw new SchemaException( |
|
| 38 | 4 | sprintf('Unable to compute modifier `%s` for the `%s` role.', $modifier::class, $role), |
|
| 39 | 4 | $e->getCode(), |
|
| 40 | $e, |
||
| 41 | ); |
||
| 46 |