Completed
Push — master ( 382b22...57bef4 )
by Pavel
02:35
created

RouterPass::process()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2.0185

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 5
cts 6
cp 0.8333
rs 9.6666
c 0
b 0
f 0
cc 2
eloc 5
nc 2
nop 1
crap 2.0185
1
<?php
2
3
namespace Bankiru\Seo\DependencyInjection\Compiler;
4
5
use Symfony\Component\Config\FileLocator;
6
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
use Symfony\Component\DependencyInjection\Loader;
9
10
final class RouterPass implements CompilerPassInterface
11
{
12
    /** {@inheritdoc} */
13 1
    public function process(ContainerBuilder $container)
14
    {
15 1
        if (!$container->has('router')) {
16
            return;
17
        }
18
19 1
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../../Resources/config'));
20 1
        $loader->load('router.yml');
21 1
    }
22
}
23