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

Kernel::configureRoutes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
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