| Conditions | 3 |
| Paths | 4 |
| Total Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function load(array $configs, ContainerBuilder $container) |
||
| 20 | { |
||
| 21 | $configuration = new Configuration(); |
||
| 22 | $config = $this->processConfiguration($configuration, $configs); |
||
| 23 | |||
| 24 | $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
||
| 25 | $loader->load('services.xml'); |
||
| 26 | |||
| 27 | if (self::supportsAutoconfiguration()) { |
||
| 28 | $container |
||
| 29 | ->registerForAutoconfiguration(TypeAwareInterface::class) |
||
| 30 | ->addTag('paysera_normalization.autoconfigured_normalizer') |
||
| 31 | ; |
||
| 32 | } |
||
| 33 | |||
| 34 | if (isset($config['register_normalizers']['date_time'])) { |
||
| 35 | $dateTimeFormat = $config['register_normalizers']['date_time']['format']; |
||
| 36 | $container->setParameter('paysera_normalization.date_time_normalizer.format', $dateTimeFormat); |
||
| 37 | $loader->load('services/date_time_normalizer.xml'); |
||
| 38 | } |
||
| 39 | } |
||
| 40 | } |
||
| 41 |