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 ( 6362ac...a2f93c )
by
unknown
10:45
created

CrossKnowledgeDeviceDetectExtension   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 7

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 7
dl 0
loc 22
c 0
b 0
f 0
ccs 0
cts 16
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 19 3
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
    public function load(array $configs, ContainerBuilder $container)
14
    {
15
        $configuration = new Configuration();
16
        $config = $this->processConfiguration($configuration, $configs);
17
18
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
19
        $loader->load('services.yml');
20
21
        $definition = $container->findDefinition('crossknowledge.device_detect');
22
        if (!empty($config['cache_manager'])) {
23
            $definition->replaceArgument(1, new Reference($config['cache_manager']));
24
        }
25
26
        if (!empty($config['device_detector_options'])) {
27
            $definition->addArgument($config['device_detector_options']);
28
        } else {
29
            $definition->addArgument(null);
30
        }
31
    }
32
}
33