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.

RegisterExtendableRendererPass::process()   A
last analyzed

Complexity

Conditions 4
Paths 4

Size

Total Lines 19
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 15
CRAP Score 4

Importance

Changes 0
Metric Value
dl 0
loc 19
ccs 15
cts 15
cp 1
rs 9.2
c 0
b 0
f 0
cc 4
eloc 11
nc 4
nop 1
crap 4
1
<?php
2
3
/*
4
 * This file is part of the Ivory Google Map bundle package.
5
 *
6
 * (c) Eric GELOEN <[email protected]>
7
 *
8
 * For the full copyright and license information, please read the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ivory\GoogleMapBundle\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 GeLo <[email protected]>
20
 */
21
class RegisterExtendableRendererPass implements CompilerPassInterface
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26 522
    public function process(ContainerBuilder $container)
27
    {
28 522
        $tag = 'ivory.google_map.helper.renderer.extendable';
29 522
        $extendableRenderer = $container->getDefinition('ivory.google_map.helper.renderer.overlay.extendable');
30
31 522
        foreach ($container->findTaggedServiceIds($tag) as $id => $attributes) {
32 522
            foreach ($attributes as $attribute) {
33 522
                if (!isset($attribute['class'])) {
34 9
                    throw new \RuntimeException(sprintf(
35 9
                        'No "class" attribute found for the tag "%s" on the service "%s".',
36 8
                        $tag,
37 1
                        $id
38 7
                    ));
39
                }
40
41 513
                $extendableRenderer->addMethodCall('setRenderer', [$attribute['class'], new Reference($id)]);
42 399
            }
43 399
        }
44 513
    }
45
}
46