| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3.0261 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function process(ContainerBuilder $containerBuilder): void |
||
| 17 | 3 | { |
|
| 18 | $configuration = $containerBuilder->getParameter('knp_dictionary.configuration'); |
||
| 19 | 3 | ||
| 20 | if (false === \is_array($configuration)) { |
||
| 21 | 3 | throw new \Exception('The configuration "knp_dictionary.dictionaries" should be an array.'); |
|
| 22 | } |
||
| 23 | |||
| 24 | foreach ($configuration['dictionaries'] as $name => $config) { |
||
| 25 | 3 | $containerBuilder->setDefinition( |
|
| 26 | 3 | \sprintf('knp_dictionary.dictionary.%s', $name), |
|
| 27 | 3 | $this->createDefinition($name, $config) |
|
| 28 | 3 | ); |
|
| 53 |