GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 71bc82...cca406 )
by
unknown
02:02
created

CrossKnowledgeDeviceDetectExtension::load()   A

Complexity

Conditions 3
Paths 4

Size

Total Lines 19
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 11
CRAP Score 3.0052

Importance

Changes 0
Metric Value
dl 0
loc 19
ccs 11
cts 12
cp 0.9167
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 12
nc 4
nop 2
crap 3.0052
1
<?php
2
3
namespace CrossKnowledge\DeviceDetectBundle\DependencyInjection;
4
5
use Symfony\Component\DependencyInjection\ContainerBuilder;
6
use Symfony\Component\Config\FileLocator;
7
use Symfony\Component\DependencyInjection\Reference;
8
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
9
use Symfony\Component\DependencyInjection\Loader;
10
11
class CrossKnowledgeDeviceDetectExtension extends Extension
12
{
13 2
    public function load(array $configs, ContainerBuilder $container)
14
    {
15 2
        $configuration = new Configuration();
16 2
        $config = $this->processConfiguration($configuration, $configs);
17
18 2
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
19 2
        $loader->load('services.yml');
20
21 2
        $definition = $container->findDefinition('crossknowledge.device_detect');
22 2
        if (!empty($config['cache_manager'])) {
23 1
            $definition->replaceArgument(1, new Reference($config['cache_manager']));
24
        }
25
26 2
        if (!empty($config['device_detector_options'])) {
27
            $definition->addArgument($config['device_detector_options']);
28
        } else {
29 2
            $definition->addArgument(null);
30
        }
31 2
    }
32
}
33