CheckAssetsEnabledPass   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 9
ccs 3
cts 4
cp 0.75
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 6 3
1
<?php
2
3
namespace Liip\MonitorBundle\DependencyInjection\Compiler;
4
5
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\DependencyInjection\Exception\LogicException;
8
9
class CheckAssetsEnabledPass implements CompilerPassInterface
10
{
11 1
    public function process(ContainerBuilder $container)
12
    {
13 1
        if ($container->has('liip_monitor.health_controller') && !$container->has('assets.packages')) {
14
            throw new LogicException('Controller support cannot be enabled unless the frameworkbundle "assets" support is also enabled.');
15
        }
16 1
    }
17
}
18