Kernel   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 6

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configureContainer() 0 13 3
A configureRoutes() 0 10 3
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the G.L.S.R. Apps package.
7
 *
8
 * (c) Dev-Int Création <[email protected]>.
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Core\Infrastructure;
15
16
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
0 ignored issues
show
Bug introduced by
The type Symfony\Bundle\Framework...Kernel\MicroKernelTrait 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...
17
use Symfony\Component\Config\Loader\LoaderInterface;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Config\Loader\LoaderInterface 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...
18
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Depend...r\ContainerConfigurator 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...
19
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\HttpKernel\Kernel 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...
20
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Routin...tor\RoutingConfigurator 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...
21
22
class Kernel extends BaseKernel
23
{
24
    use MicroKernelTrait;
25
26
    protected function configureContainer(ContainerConfigurator $container, LoaderInterface $loader): void
27
    {
28
        $container->import('../../../config/{packages}/*.yaml');
29
        $container->import('../../../config/{packages}/' . $this->environment . '/*.yaml');
30
31
        if (\is_file(\dirname(__DIR__, 3) . '/config/services.yaml')) {
32
            $container->import('../../../config/services.yaml');
33
            $container->import('../../../config/{services}_' . $this->environment . '.yaml');
34
        } elseif (\is_file($path = \dirname(__DIR__, 3) . '/config/services.php')) {
35
            (require $path)($container->withPath($path), $this);
36
        }
37
38
        $loader->load($this->getProjectDir() . '/src/**/Infrastructure/Symfony/Resources/config/services.yaml', 'glob');
39
    }
40
41
    protected function configureRoutes(RoutingConfigurator $routes): void
42
    {
43
        $routes->import('../../../config/{routes}/' . $this->environment . '/*.yaml');
44
        $routes->import('../../../config/{routes}/*.yaml');
45
        $routes->import($this->getProjectDir() . '/src/**/Infrastructure/Symfony/Resources/config/routes.yaml', 'glob');
46
47
        if (\is_file(\dirname(__DIR__, 3) . '/config/routes.yaml')) {
48
            $routes->import('../../../config/routes.yaml');
49
        } elseif (\is_file($path = \dirname(__DIR__, 3) . '/config/routes.php')) {
50
            (require $path)($routes->withPath($path), $this);
51
        }
52
    }
53
}
54