Passed
Pull Request — master (#52)
by Matthieu
04:27
created

Kernel   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 51
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getCacheDir() 0 3 1
A configureRoutes() 0 3 1
A getProjectDir() 0 3 1
A getLogDir() 0 3 1
A configureContainer() 0 4 1
A build() 0 3 1
1
<?php declare(strict_types = 1);
2
3
namespace AtlassianConnectBundle\Tests\Functional\App;
4
5
use Psr\Log\NullLogger;
6
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
9
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
10
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
11
12
/**
13
 * class Kernel
14
 */
15
final class Kernel extends BaseKernel
16
{
17
    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 AtlassianConnectBundle\Tests\Functional\App\Kernel.
Loading history...
18
19
    /**
20
     * @return string
21
     */
22
    public function getProjectDir()
23
    {
24
        return \dirname(__DIR__);
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getCacheDir()
31
    {
32
        return \sys_get_temp_dir().'/com.github.thecatontheflat.atlassian/tests/var/cache';
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getLogDir()
39
    {
40
        return \sys_get_temp_dir().'/com.github.thecatontheflat.atlassian/tests/var'.$this->environment.'/log';
41
    }
42
43
    /**
44
     * @param ContainerConfigurator $container
45
     */
46
    public function configureContainer(ContainerConfigurator $container): void
47
    {
48
        $container->import('../config/{packages}/*.yaml');
49
        $container->import('../config/{services}*.yaml');
50
    }
51
52
    /**
53
     * @param RoutingConfigurator $routes
54
     */
55
    public function configureRoutes(RoutingConfigurator $routes): void
56
    {
57
        $routes->import('../config/routes.yaml');
58
    }
59
60
    /**
61
     * @param ContainerBuilder $container
62
     */
63
    protected function build(ContainerBuilder $container)
64
    {
65
        $container->register('logger', NullLogger::class);
66
    }
67
}
68