Completed
Branch v1.x-dev (59bcf7)
by Benjamin
05:08
created

BuildAssetsPass   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 8
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 6 2
1
<?php
2
3
namespace Obblm\Core\DependencyInjection\CompilerPass;
4
5
use Obblm\Core\Helper\AssetPackager;
6
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
use Symfony\Component\DependencyInjection\Reference;
9
10
class BuildAssetsPass implements CompilerPassInterface
11
{
12 2
    public function process(ContainerBuilder $container)
13
    {
14 2
        $definition = $container->findDefinition(AssetPackager::class);
15
16 2
        foreach ($container->findTaggedServiceIds('obblm.asset_packager') as $id => $tags) {
17 2
            $definition->addMethodCall('addBuildAsset', [new Reference($id)]);
18
        }
19 2
    }
20
}
21