Bundle   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 13

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 13
dl 0
loc 34
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getContainerExtension() 0 8 2
A buildConfiguration() 0 3 1
A buildContainer() 0 3 1
A build() 0 14 1
1
<?php
2
3
namespace Knp\RadBundle\AppBundle;
4
5
use Symfony\Component\HttpKernel\Bundle\Bundle as BaseBundle;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
8
use Knp\RadBundle\DependencyInjection\Compiler;
9
use Symfony\Component\Config\Definition\Builder\NodeParentInterface;
10
11
class Bundle extends BaseBundle implements ConfigurableBundleInterface
12
{
13
    public function build(ContainerBuilder $container)
14
    {
15
        $container->addCompilerPass(new Compiler\RemoveUnavailableServicesPass);
16
        $container->addCompilerPass(new Compiler\RegisterAliceProvidersPass($this));
0 ignored issues
show
Unused Code introduced by
The call to RegisterAliceProvidersPass::__construct() has too many arguments starting with $this.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
17
        $container->addCompilerPass(new Compiler\RegisterDoctrineRepositoriesPass($this));
18
        $container->addCompilerPass(new Compiler\RegisterFormCreatorsPass);
19
        $container->addCompilerPass(new Compiler\RegisterTwigExtensionsPass($this));
20
        $container->addCompilerPass(new Compiler\RegisterSecurityVotersPass($this));
21
        $container->addCompilerPass(new Compiler\RegisterAppBundlePass($this));
22
        $container->addCompilerPass(new Compiler\RegisterFormTypesPass($this));
23
        $container->addCompilerPass(new Compiler\RegisterFormTypeExtensionsPass($this));
24
        $container->addCompilerPass(new Compiler\RegisterValidatorConstraintsPass($this));
25
        $container->addCompilerPass(new Compiler\RegisterFormCreatorsPass);
26
    }
27
28
    public function getContainerExtension()
29
    {
30
        if ($extension = parent::getContainerExtension()) {
31
            return $extension;
32
        }
33
34
        return $this->extension = new ContainerExtension($this);
35
    }
36
37
    public function buildConfiguration(NodeParentInterface $rootNode)
38
    {
39
    }
40
41
    public function buildContainer(array $config, ContainerBuilder $container)
42
    {
43
    }
44
}
45