Passed
Push — master ( 0bf361...32fd70 )
by Pol
01:57
created

PhpDirectiveExtension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 9
c 1
b 0
f 0
dl 0
loc 19
ccs 7
cts 7
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 14 1
1
<?php
2
3
/**
4
 * For the full copyright and license information, please view
5
 * the LICENSE file that was distributed with this source code.
6
 *
7
 * @see https://github.com/ecphp
8
 */
9
10
declare(strict_types=1);
11
12
namespace EcPhp\PhpDirectiveBundle\DependencyInjection;
13
14
use Symfony\Component\Config\FileLocator;
15
use Symfony\Component\DependencyInjection\ContainerBuilder;
16
use Symfony\Component\DependencyInjection\Extension\Extension;
17
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
18
19
final class PhpDirectiveExtension extends Extension
20
{
21
    /**
22
     * @phpstan-ignore-next-line
23
     */
24 1
    public function load(array $configs, ContainerBuilder $container): void
25
    {
26
        $container
27 1
            ->setParameter(
28 1
                'php_directive',
29 1
                $this->processConfiguration(new Configuration(), $configs)
30
            );
31
32 1
        $loader = new PhpFileLoader(
33
            $container,
34 1
            new FileLocator(__DIR__ . '/../Resources/config')
35
        );
36
37 1
        $loader->load('services.php');
38 1
    }
39
}
40