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.

Ozean12WebTranslateItExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 6
dl 0
loc 27
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 18 1
1
<?php
2
3
namespace Ozean12\WebTranslateItBundle\DependencyInjection;
4
5
use Symfony\Component\DependencyInjection\ContainerBuilder;
6
use Symfony\Component\Config\FileLocator;
7
use Symfony\Component\DependencyInjection\Definition;
8
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
9
use Symfony\Component\DependencyInjection\Loader;
10
11
/**
12
 * This is the class that loads and manages your bundle configuration.
13
 *
14
 * @link http://symfony.com/doc/current/cookbook/bundles/extension.html
15
 */
16
class Ozean12WebTranslateItExtension extends Extension
17
{
18
    const REPOSITORY_DEFINITION_ID = 'ozean12.webtranslateit.repository.service';
19
    const COMMAND_DEFINITION_ID = 'ozean12.webtranslateit.pull.command';
20
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public function load(array $configs, ContainerBuilder $container)
25
    {
26
        $configuration = new Configuration();
27
        $config = $this->processConfiguration($configuration, $configs);
28
29
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
30
        $loader->load('services.yml');
31
32
        $container->getDefinition(self::REPOSITORY_DEFINITION_ID)
33
            ->replaceArgument(0, $config['read_key'])
34
            ->replaceArgument(1, $config['base_url'])
35
            ->replaceArgument(2, new Definition('%guzzle.http_client.class%'))
36
        ;
37
38
        $container->getDefinition(self::COMMAND_DEFINITION_ID)
39
            ->replaceArgument(2, $config['pull_path'])
40
        ;
41
    }
42
}
43