Test Failed
Push — master ( 069f49...4b1c03 )
by Ludwig
06:38
created

CwdPowerDNSClientExtension::load()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 9
nc 1
nop 2
dl 0
loc 13
rs 9.9666
c 0
b 0
f 0
1
<?php
2
/*
3
 * This file is part of the CwdPowerDNS Client
4
 *
5
 * (c) 2018 cwd.at GmbH <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
declare(strict_types=1);
12
13
namespace Cwd\PowerDNSClient\DependencyInjection;
14
15
use Symfony\Component\Config\FileLocator;
1 ignored issue
show
Bug introduced by
The type Symfony\Component\Config\FileLocator was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
16
use Symfony\Component\DependencyInjection\ContainerBuilder;
1 ignored issue
show
Bug introduced by
The type Symfony\Component\Depend...ection\ContainerBuilder was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
17
use Symfony\Component\DependencyInjection\Extension\Extension;
1 ignored issue
show
Bug introduced by
The type Symfony\Component\Depend...ion\Extension\Extension was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
18
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
1 ignored issue
show
Bug introduced by
The type Symfony\Component\Depend...n\Loader\YamlFileLoader was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
19
20
class CwdPowerDNSClientExtension extends Extension
21
{
22
    public function load(array $configs, ContainerBuilder $container)
23
    {
24
        $configuration = new Configuration();
25
        $config = $this->processConfiguration($configuration, $configs);
26
        $container->setParameter('cwd_power_dns_client.uri', $config['uri']);
27
        $container->setParameter('cwd_power_dns_client.api_key', $config['api_key']);
28
        $container->setParameter('cwd_power_dns_client.default_server', $config['default_server']);
29
30
        $loader = new YamlFileLoader(
31
            $container,
32
            new FileLocator(__DIR__.'/../Resources/config')
33
        );
34
        $loader->load('services.yaml');
35
    }
36
}
37