Completed
Push — 1.0 ( 30aea4...7767b3 )
by Rob
9s
created

LocatorsCompilerPass   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 8 3
1
<?php
2
3
/*
4
 * This file is part of the `liip/LiipImagineBundle` project.
5
 *
6
 * (c) https://github.com/liip/LiipImagineBundle/graphs/contributors
7
 *
8
 * For the full copyright and license information, please view the LICENSE.md
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Liip\ImagineBundle\DependencyInjection\Compiler;
13
14
use Symfony\Component\DependencyInjection\ContainerBuilder;
15
16
class LocatorsCompilerPass extends AbstractCompilerPass
17
{
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function process(ContainerBuilder $container)
22
    {
23
        foreach ($container->findTaggedServiceIds('liip_imagine.binary.locator') as $id => $tags) {
24
            if (isset($tags[0]['shared'])) {
25
                $this->setDefinitionSharing($container->getDefinition($id), $tags[0]['shared']);
26
            }
27
        }
28
    }
29
}
30