Kernel::configureContainer()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
cc 2
nc 2
nop 1
crap 6
1
<?php
2
3
/**
4
 * For the full copyright and license information, please view
5
 * the LICENSE file that was distributed with this source code.
6
 *
7
 * @see https://github.com/ecphp
8
 */
9
10
declare(strict_types=1);
11
12
namespace EcPhp\PhpDirectiveBundle\Tests\Fixtures\App;
13
14
use EcPhp\PhpDirectiveBundle\PhpDirectiveBundle;
15
use FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle;
16
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
17
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
18
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
19
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
20
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
21
22
final class Kernel extends BaseKernel
23
{
24
    use MicroKernelTrait;
0 ignored issues
show
Bug introduced by
The trait Symfony\Bundle\Framework...Kernel\MicroKernelTrait requires the property $instanceof which is not provided by EcPhp\PhpDirectiveBundle\Tests\Fixtures\App\Kernel.
Loading history...
25
26
    public function registerBundles()
27
    {
28
        return [
29
            new FriendsOfBehatSymfonyExtensionBundle(),
30
            new PhpDirectiveBundle(),
31
            new FrameworkBundle(),
32
        ];
33
    }
34
35
    protected function configureContainer(ContainerConfigurator $container): void
36
    {
37
        foreach (glob(__DIR__ . '/config/*.yaml') as $file) {
38
            $container->import($file);
39
        }
40
    }
41
42
    protected function configureRoutes(RoutingConfigurator $routes): void
43
    {
44
        foreach (glob(__DIR__ . '/config/routes/*.yaml') as $file) {
45
            $routes->import($file);
46
        }
47
    }
48
}
49