SlugifyPass   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 16 2
1
<?php
2
3
namespace DoS\ResourceBundle\DependencyInjection\Compiler;
4
5
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
8
class SlugifyPass implements CompilerPassInterface
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function process(ContainerBuilder $container)
14
    {
15
        if (!$container->hasDefinition('cocur_slugify')) {
16
            return;
17
        }
18
19
        $definition = $container->getDefinition('cocur_slugify');
20
21
        $definition->addMethodCall('setRegExp', array(
22
            $container->getParameter('dos.slugify.reg_exp')
23
        ));
24
25
        $definition->addMethodCall('setOptions', array(
26
            array('lowercase' => $container->getParameter('dos.slugify.lowercase'))
27
        ));
28
    }
29
}
30