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

BuildAssetsPass::process()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

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