Passed
Push — master ( e228f8...a65d71 )
by Pol
07:50
created

Kernel   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
eloc 10
c 1
b 0
f 0
dl 0
loc 24
ccs 0
cts 8
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 6 1
A configureContainer() 0 4 2
A configureRoutes() 0 4 2
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