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