| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | protected function getOptions(ContainerInterface $container, string $driverName, ?array $options = null): array |
||
| 31 | { |
||
| 32 | if (null === $options) { |
||
| 33 | /** @var DoctrineConfigInterface $doctrineConfig */ |
||
| 34 | $doctrineConfig = $container->get(DoctrineConfigInterface::class); |
||
| 35 | |||
| 36 | if (!$doctrineConfig->hasDriverConfig($driverName)) { |
||
| 37 | throw new ServiceNotCreatedException( |
||
| 38 | sprintf('Unable to find driver configuration for \'%s\'', $driverName) |
||
| 39 | ); |
||
| 40 | } |
||
| 41 | |||
| 42 | $options = $doctrineConfig->getDriverConfig($driverName); |
||
| 43 | } |
||
| 44 | |||
| 45 | return array_replace_recursive($this->defaultOptions, $options); |
||
| 46 | } |
||
| 48 |