TestKernel::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
use Symfony\Component\Config\Loader\LoaderInterface;
4
use Symfony\Component\DependencyInjection\ContainerBuilder;
5
use Symfony\Component\Routing\RouteCollectionBuilder;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Routing\RouteCollectionBuilder 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...
6
7
class TestKernel extends \Symfony\Component\HttpKernel\Kernel
8
{
9
    use \Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
0 ignored issues
show
Bug introduced by
The trait Symfony\Bundle\Framework...Kernel\MicroKernelTrait requires the property $instanceof which is not provided by TestKernel.
Loading history...
10
11
    private $config;
12
13
    public function __construct(?string $config = null)
14
    {
15
        parent::__construct($config ? dechex(crc32($config)) : 'dev', true);
16
17
        $this->config = $config;
18
    }
19
20
    public function registerBundles(): iterable
21
    {
22
        return [
23
            new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
24
            new \Bdf\QueueBundle\BdfQueueBundle(),
25
            new \Bdf\PrimeBundle\PrimeBundle(),
26
        ];
27
    }
28
29
    protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader)
0 ignored issues
show
Unused Code introduced by
The parameter $c is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

29
    protected function configureContainer(/** @scrutinizer ignore-unused */ ContainerBuilder $c, LoaderInterface $loader)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
30
    {
31
        $loader->load($this->config ?? __DIR__.'/Fixtures/conf.yaml');
32
    }
33
34
    // PHP 7.1
35
    protected function configureRoutes(RouteCollectionBuilder $routes)
0 ignored issues
show
Unused Code introduced by
The parameter $routes is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

35
    protected function configureRoutes(/** @scrutinizer ignore-unused */ RouteCollectionBuilder $routes)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
36
    {
37
    }
38
}
39