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

ProviderPass::process()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 7
cp 0
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
crap 6
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