| Conditions | 3 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | 1 | public function load(array $configs, ContainerBuilder $container) |
|
| 22 | { |
||
| 23 | 1 | $configuration = new Configuration(); |
|
| 24 | 1 | $config = $this->processConfiguration($configuration, $configs); |
|
| 25 | |||
| 26 | 1 | $container->setParameter('procergs.nfg.cpf_verification.base_uri', $config['base_uri']); |
|
| 27 | |||
| 28 | 1 | $endpoints = []; |
|
| 29 | 1 | if (isset($config['list_challenges_path'])) { |
|
| 30 | 1 | $endpoints['listChallenges'] = $config['list_challenges_path']; |
|
| 31 | } |
||
| 32 | 1 | if (isset($config['challenge_path'])) { |
|
| 33 | 1 | $endpoints['challenge'] = $config['challenge_path']; |
|
| 34 | } |
||
| 35 | 1 | $container->setParameter('procergs.nfg.cpf_verification.options.endpoints', $endpoints); |
|
| 36 | |||
| 37 | 1 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 38 | 1 | $loader->load('services.yml'); |
|
| 39 | 1 | } |
|
| 41 |