| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 6 | public function load(array $configs, ContainerBuilder $container) |
|
| 17 | { |
||
| 18 | 6 | $configuration = new Configuration(); |
|
| 19 | 6 | $config = $this->processConfiguration($configuration, $configs); |
|
| 20 | |||
| 21 | 4 | $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 22 | 4 | $loader->load('services.xml'); |
|
| 23 | |||
| 24 | 4 | $container->setParameter('la_showroom_tax_jar.api_token', $config['api_token']); |
|
| 25 | |||
| 26 | 4 | if (!empty($config['cache'])) { |
|
| 27 | $container |
||
| 28 | 2 | ->getDefinition('la_showroom_tax_jar.client') |
|
| 29 | 2 | ->addMethodCall('setCacheItemPool', [ |
|
| 30 | 2 | new Reference($config['cache']) |
|
| 31 | ]) |
||
| 32 | ; |
||
| 33 | } |
||
| 34 | 4 | } |
|
| 35 | } |
||
| 36 |