AppKernel::getCacheDir()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace examples\Clearcode\CommandBusConsole\App;
4
5
use Matthias\SymfonyConsoleForm\Bundle\SymfonyConsoleFormBundle;
6
use Symfony\Component\Config\Loader\LoaderInterface;
7
use Symfony\Component\HttpKernel\Kernel;
8
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
9
use SimpleBus\SymfonyBridge\SimpleBusCommandBusBundle;
10
use Clearcode\CommandBusConsole\Bundle\CommandBusConsoleBundle;
11
12
class AppKernel extends Kernel
13
{
14
    /** {@inheritdoc} */
15
    public function registerBundles()
16
    {
17
        return [
18
            new FrameworkBundle(),
19
            new SimpleBusCommandBusBundle(),
20
            new SymfonyConsoleFormBundle(),
21
            new CommandBusConsoleBundle(),
22
        ];
23
    }
24
25
    /** {@inheritdoc} */
26
    public function getCacheDir()
27
    {
28
        return $this->tmpDir().'/cache';
29
    }
30
31
    /** {@inheritdoc} */
32
    public function getLogDir()
33
    {
34
        return $this->tmpDir().'/logs';
35
    }
36
37
    /** {@inheritdoc} */
38
    public function registerContainerConfiguration(LoaderInterface $loader)
39
    {
40
        $loader->load(__DIR__.'/config.yml');
41
    }
42
43
    private function tmpDir()
44
    {
45
        return sys_get_temp_dir().'/clearcode_command_bus_console_examples';
46
    }
47
}
48