Failed Conditions
Push — master ( 516359...a8b39a )
by Florent
04:00
created

AppKernel   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 11

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 11
dl 0
loc 32
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * The MIT License (MIT)
7
 *
8
 * Copyright (c) 2014-2017 Spomky-Labs
9
 *
10
 * This software may be modified and distributed under the terms
11
 * of the MIT license.  See the LICENSE file for details.
12
 */
13
14
use OAuth2Framework\Bundle\Server\OAuth2FrameworkServerBundle;
15
use Symfony\Component\Config\Loader\LoaderInterface;
16
use Symfony\Component\HttpKernel\Kernel;
17
18
final class AppKernel extends Kernel
19
{
20
    public function registerBundles()
21
    {
22
        $bundles = [
23
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
24
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
25
            new Symfony\Bundle\TwigBundle\TwigBundle(),
26
27
            new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
28
29
            new SpomkyLabs\JoseBundle\SpomkyLabsJoseBundle(),
30
            new OAuth2FrameworkServerBundle(),
31
            new OAuth2Framework\Bundle\Server\Tests\TestBundle\SpomkyLabsTestBundle(),
32
33
            new SimpleBus\SymfonyBridge\SimpleBusEventBusBundle(),
34
            new SimpleBus\SymfonyBridge\SimpleBusCommandBusBundle(),
35
        ];
36
37
        return $bundles;
38
    }
39
40
    public function getCacheDir()
41
    {
42
        return sys_get_temp_dir().'/OAuth2FrameworkServerTest/'.$this->getEnvironment();
43
    }
44
45
    public function registerContainerConfiguration(LoaderInterface $loader)
46
    {
47
        $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
48
    }
49
}
50