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 ( f3e785...6efe3c )
by Cas
04:09
created

CLSlackExtension::setParameters()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 11
Bugs 1 Features 4
Metric Value
cc 1
eloc 3
c 11
b 1
f 4
nc 1
nop 2
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
1
<?php
2
3
/*
4
 * This file is part of the CLSlackBundle.
5
 *
6
 * (c) Cas Leentfaar <[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 CL\Bundle\SlackBundle\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 Cas Leentfaar <[email protected]>
21
 */
22
class CLSlackExtension extends Extension
23
{
24
    /**
25
     * @param array[]          $configs
26
     * @param ContainerBuilder $container
27
     */
28 2
    public function load(array $configs, ContainerBuilder $container)
29
    {
30 2
        $configuration = new Configuration();
31 2
        $config        = $this->processConfiguration($configuration, $configs);
32
33 2
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
34 2
        $loader->load('services.yml');
35
36 2
        $this->setParameters($container, $config);
37 2
    }
38
39
    /**
40
     * @param ContainerBuilder $container
41
     * @param string[]         $config
42
     */
43 2
    protected function setParameters(ContainerBuilder $container, array $config)
44
    {
45 2
        $container->setParameter('cl_slack.api_token', $config['api_token']);
46 2
        $container->setParameter('cl_slack.test', $config['test']);
47 2
    }
48
}
49