Completed
Push — master ( 1b016a...f598f3 )
by Beñat
59s
created

AppKernel::getLogDir()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Kreta package.
5
 *
6
 * (c) Beñat Espiña <[email protected]>
7
 * (c) Gorka Laucirica <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace Kreta\TaskManager\Infrastructure\Symfony;
14
15
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
16
use Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle;
17
use Kreta\TaskManager\Infrastructure\Symfony\Bundle\AppBundle;
18
use OldSound\RabbitMqBundle\OldSoundRabbitMqBundle;
19
use Overblog\GraphQLBundle\OverblogGraphQLBundle;
20
use Sensio\Bundle\DistributionBundle\SensioDistributionBundle;
21
use SimpleBus\SymfonyBridge\DoctrineOrmBridgeBundle;
22
use SimpleBus\SymfonyBridge\SimpleBusCommandBusBundle;
23
use SimpleBus\SymfonyBridge\SimpleBusEventBusBundle;
24
use Symfony\Bundle\DebugBundle\DebugBundle;
25
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
26
use Symfony\Bundle\MonologBundle\MonologBundle;
27
use Symfony\Bundle\SecurityBundle\SecurityBundle;
28
use Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle;
29
use Symfony\Bundle\TwigBundle\TwigBundle;
30
use Symfony\Bundle\WebProfilerBundle\WebProfilerBundle;
31
use Symfony\Component\Config\Loader\LoaderInterface;
32
use Symfony\Component\HttpKernel\Kernel;
33
use Warezgibzzz\QueryBusBundle\WarezgibzzzQueryBusBundle;
34
35
class AppKernel extends Kernel
36
{
37
    public function registerBundles()
38
    {
39
        $bundles = [
40
            new AppBundle(),
41
            new DoctrineBundle(),
42
            new DoctrineMigrationsBundle(),
43
            new DoctrineOrmBridgeBundle(),
44
            new FrameworkBundle(),
45
            new OldSoundRabbitMqBundle(),
46
            new OverblogGraphQLBundle(),
47
            new MonologBundle(),
48
            new SecurityBundle(),
49
            new SimpleBusCommandBusBundle(),
50
            new SimpleBusEventBusBundle(),
51
            new SwiftmailerBundle(),
52
            new TwigBundle(),
53
            new WarezgibzzzQueryBusBundle(),
54
        ];
55
56 View Code Duplication
        if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
57
            $bundles[] = new DebugBundle();
58
            $bundles[] = new SensioDistributionBundle();
59
            $bundles[] = new WebProfilerBundle();
60
        }
61
62
        return $bundles;
63
    }
64
65
    public function getRootDir()
66
    {
67
        return __DIR__;
68
    }
69
70
    public function getCacheDir()
71
    {
72
        return dirname(__DIR__) . '/../../var/cache/' . $this->getEnvironment();
73
    }
74
75
    public function getLogDir()
76
    {
77
        return dirname(__DIR__) . '/../../var/logs';
78
    }
79
80
    public function registerContainerConfiguration(LoaderInterface $loader)
81
    {
82
        $loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
83
    }
84
}
85