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.

AjglCsvExtension   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Test Coverage

Coverage 92.86%

Importance

Changes 6
Bugs 2 Features 0
Metric Value
wmc 2
c 6
b 2
f 0
lcom 0
cbo 6
dl 0
loc 22
ccs 13
cts 14
cp 0.9286
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 19 2
1
<?php
2
3
/*
4
 * AJGL CSV Bundle
5
 *
6
 * Copyright (C) Antonio J. García Lagar <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ajgl\Bundle\CsvBundle\DependencyInjection;
13
14
use Symfony\Component\Config\FileLocator;
15
use Symfony\Component\DependencyInjection\ContainerBuilder;
16
use Symfony\Component\DependencyInjection\Loader;
17
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
18
19
/**
20
 * @author Antonio J. García Lagar <[email protected]>
21
 */
22
class AjglCsvExtension extends Extension
23
{
24 1
    public function load(array $config, ContainerBuilder $container)
25
    {
26 1
        $configuration = new Configuration();
27 1
        $config = $this->processConfiguration($configuration, $config);
28
29 1
        $container->setParameter('ajgl_csv.reader.default_type', $config['reader_default_type']);
30 1
        $container->setParameter('ajgl_csv.writer.default_type', $config['writer_default_type']);
31
32 1
        $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
33 1
        if (method_exists('Symfony\Component\DependencyInjection\Definition', 'getFactoryClass')) {
34 1
            $loader->load('csv.legacy.xml');
35 1
        } else {
36
            $loader->load('csv.xml');
37
        }
38
39 1
        $csvDefinition = $container->getDefinition('ajgl_csv');
40 1
        $csvDefinition->addMethodCall('setDefaultReaderType', array('%ajgl_csv.reader.default_type%'));
41 1
        $csvDefinition->addMethodCall('setDefaultWriterType', array('%ajgl_csv.writer.default_type%'));
42 1
    }
43
}
44