AppKernel   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 0
cbo 6
dl 0
loc 36
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBundles() 0 9 1
A getCacheDir() 0 4 1
A getLogDir() 0 4 1
A registerContainerConfiguration() 0 4 1
A tmpDir() 0 4 1
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