AtlassianConnectExtension::load()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 2
dl 0
loc 11
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AtlassianConnectBundle\DependencyInjection;
6
7
use Symfony\Component\Config\FileLocator;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
use Symfony\Component\DependencyInjection\Loader;
10
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
11
12
class AtlassianConnectExtension extends Extension
13
{
14
    public function load(array $configs, ContainerBuilder $container): void
15
    {
16
        $configuration = new Configuration();
17
        $config = $this->processConfiguration($configuration, $configs);
18
19
        $container->setParameter('atlassian_connect', $config['descriptor']);
20
        $container->setParameter('atlassian_connect_dev_tenant', $config['dev_tenant']);
21
        $container->setParameter('atlassian_connect_license_allow_list', $config['license_allow_list']);
22
23
        $loader = new Loader\PhpFileLoader($container, new FileLocator(\dirname(__DIR__).'/Resources/config'));
24
        $loader->load('services.php');
25
    }
26
}
27