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.

GeneratorCompilerPass::process()   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 18
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 11
CRAP Score 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 18
ccs 11
cts 11
cp 1
rs 9.4286
cc 3
eloc 9
nc 3
nop 1
crap 3
1
<?php
2
3
/**
4
 * This file is part of the DpnXmlSitemapBundle package.
5
 *
6
 * (c) Björn Fromme <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the Resources/meta/LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Dpn\XmlSitemapBundle\DependencyInjection\Compiler;
13
14
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
15
use Symfony\Component\DependencyInjection\ContainerBuilder;
16
use Symfony\Component\DependencyInjection\Reference;
17
18
/**
19
 * @author Kevin Bond <[email protected]>
20
 */
21
class GeneratorCompilerPass implements CompilerPassInterface
22
{
23
    /**
24
     * {@inheritDoc}
25
     */
26 4
    public function process(ContainerBuilder $container)
27
    {
28 4
        if (false === $container->hasDefinition('dpn_xml_sitemap.manager')) {
29 1
            return;
30
        }
31
32 3
        $definition = $container->getDefinition(
33
            'dpn_xml_sitemap.manager'
34 3
        );
35
36 3
        $taggedServices = $container->findTaggedServiceIds(
37
            'dpn_xml_sitemap.generator'
38 3
        );
39
40 3
        foreach ($taggedServices as $id => $attributes) {
41 3
            $definition->addMethodCall('addGenerator', array(new Reference($id)));
42 3
        }
43 3
    }
44
}
45