Completed
Push — master ( 2c723d...233fcc )
by Yaroslav
01:56
created

SetTwigVariablesPass   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 8 1
1
<?php
2
3
namespace Harentius\BlogBundle\DependencyInjection\CompilerPass;
4
5
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
8
class SetTwigVariablesPass implements CompilerPassInterface
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function process(ContainerBuilder $container)
14
    {
15
        $definition = $container->getDefinition('twig');
16
        $definition->addMethodCall(
17
            'addGlobal',
18
            ['image_previews_base_uri', $container->getParameter('harentius_blog.articles.image_previews_base_uri')]
19
        );
20
    }
21
}
22