Kernel::build()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 4
c 2
b 0
f 0
dl 0
loc 6
rs 10
ccs 0
cts 0
cp 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace App;
4
5
use App\DependencyInjection\Compiler\RemoveCleanupCommandPass;
6
use App\DependencyInjection\Compiler\RemoveDumpCommandPass;
7
use App\DependencyInjection\Compiler\RemovePcntlEventSubscriberPass;
8
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
9
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
10
use Symfony\Component\Config\Loader\LoaderInterface;
11
use Symfony\Component\Config\Resource\FileResource;
12
use Symfony\Component\DependencyInjection\ContainerBuilder;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Depend...ection\ContainerBuilder was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
14
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
15
16
class Kernel extends BaseKernel
17
{
18
    use MicroKernelTrait;
0 ignored issues
show
introduced by
The trait Symfony\Bundle\Framework...Kernel\MicroKernelTrait requires some properties which are not provided by App\Kernel: $instanceof, $name
Loading history...
19
20
    public function build(ContainerBuilder $container) {
21
        /** @var SecurityExtension $extension */
22
        $extension = $container->getExtension('security');
0 ignored issues
show
Unused Code introduced by
The assignment to $extension is dead and can be removed.
Loading history...
23
        $container->addCompilerPass(new RemoveDumpCommandPass());
24
        $container->addCompilerPass(new RemoveCleanupCommandPass());
25
        $container->addCompilerPass(new RemovePcntlEventSubscriberPass());
26
    }
27
}
28