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 ( 2ed70b...36b939 )
by Edi
09:30
created

TwigRuntimePass::process()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 17
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 17
rs 9.4285
cc 2
eloc 8
nc 2
nop 1
1
<?php
2
3
namespace Netgen\Bundle\EnhancedSelectionBundle\DependencyInjection\CompilerPass;
4
5
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\DependencyInjection\Reference;
8
9
class TwigRuntimePass implements CompilerPassInterface
10
{
11
    public function process(ContainerBuilder $container)
12
    {
13
        if ($container->has('twig.runtime_loader')) {
14
            // If official Twig runtime loader exists,
15
            // we skip using our custom runtime loader
16
            return;
17
        }
18
19
        $twig = $container->findDefinition('twig');
20
21
        $twig->addMethodCall(
22
            'addRuntimeLoader',
23
            array(
24
                new Reference('netgen.enhanced_selection.templating.twig.runtime.loader'),
25
            )
26
        );
27
    }
28
}
29