| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function process(ContainerBuilder $container) |
||
| 14 | { |
||
| 15 | $knownRepositories = $this->getKnownRepositoryAliases(); |
||
| 16 | $repositoryServiceId = $container->getParameter('run_open_code.exchange_rate.repository'); |
||
| 17 | |||
| 18 | $repositoryServiceId = isset($knownRepositories[$repositoryServiceId]) ? $knownRepositories[$repositoryServiceId] : $repositoryServiceId; |
||
| 19 | |||
| 20 | if (!$container->hasDefinition($repositoryServiceId)) { |
||
| 21 | throw new \RuntimeException(sprintf('Unknown repository service "%s" referenced in configuration.', $repositoryServiceId)); |
||
| 22 | } |
||
| 23 | |||
| 24 | $container->setDefinition('run_open_code.exchange_rate.repository', $container->getDefinition($repositoryServiceId)); |
||
| 25 | } |
||
| 26 | |||
| 34 |