ReverseProxyHelperExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

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\ReverseProxyHelperBundle\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 ReverseProxyHelperExtension extends Extension
20
{
21
    /**
22
     * @phpstan-ignore-next-line
23
     */
24 1
    public function load(array $configs, ContainerBuilder $container): void
25
    {
26 1
        $configuration = new Configuration();
27 1
        $config = $this->processConfiguration($configuration, $configs);
28
29
        // Load EC Reverse Proxy configuration.
30 1
        $container->setParameter('reverse_proxy_helper', $config);
31
32 1
        $loader = new PhpFileLoader(
33
            $container,
34 1
            new FileLocator(__DIR__ . '/../Resources/config')
35
        );
36
37 1
        $loader->load('services.php');
38
    }
39
}
40