Completed
Push — master ( 763b8f...6e46cd )
by Kevin
01:32
created

CheckAssetsEnabledPass   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 12
rs 10

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
    /**
12
     * @param ContainerBuilder $container
13
     */
14
    public function process(ContainerBuilder $container)
15
    {
16
        if ($container->has('liip_monitor.health_controller') && !$container->has('assets.packages')) {
17
            throw new LogicException('Controller support cannot be enabled unless the frameworkbundle "assets" support is also enabled.');
18
        }
19
    }
20
}
21