Completed
Push — master ( 3b23f0...80edcc )
by
unknown
13:12
created

ProviderPass   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 13
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 7 2
1
<?php
2
3
namespace MediaMonks\SonataMediaBundle\DependencyInjection\Compiler;
4
5
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\DependencyInjection\Reference;
8
9
class ProviderPass implements CompilerPassInterface
10
{
11
    /**
12
     * @param ContainerBuilder $container
13
     */
14
    public function process(ContainerBuilder $container)
15
    {
16
        $taggedServices = $container->findTaggedServiceIds('sonata_media.provider');
17
        foreach ($taggedServices as $id => $tags) {
18
            $container->getDefinition($id)->replaceArgument(0, new Reference('mediamonks.sonata_media.filesystem.private'));
19
        }
20
    }
21
}
22