Passed
Branch improve-tests (bb8a86)
by Kamil
17:48
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
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
4
use Symfony\Component\Config\Loader\LoaderInterface;
5
use Symfony\Component\DependencyInjection\ContainerBuilder;
6
use Symfony\Component\HttpKernel\Kernel;
7
8
class AppKernel extends Kernel
9
{
10
    use MicroKernelTrait;
11
12
    /**
13
     * @return array
14
     */
15
    public function registerBundles()
16
    {
17
        return [
18
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
19
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
20
//            new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
21
            new Galileo\SettingBundle\GalileoSettingBundle(),
22
        ];
23
    }
24
25
    /**
26
     * @return string
27
     */
28
    public function getCacheDir()
29
    {
30
        return sys_get_temp_dir().'/cache'.$this->environment;
31
    }
32
33
    /**
34
     * @return string
35
     */
36
    public function getLogDir()
37
    {
38
        return sys_get_temp_dir().'/logs';
39
    }
40
41
    /**
42
     * @param ContainerBuilder $c
43
     * @param LoaderInterface $loader
44
     */
45
    protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader)
0 ignored issues
show
Unused Code introduced by
The parameter $loader is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
46
    {
47
        $c->loadFromExtension(
48
            'framework',
49
            [
50
                'secret' => 'my$ecret',
51
                'test' => null,
52
                'templating' => ['engines' => ['php']],
53
                'profiler' => [
54
                    'collect' => false,
55
                ],
56
            ]
57
        );
58
        $c->loadFromExtension(
59
            'doctrine',
60
            [
61
                'orm' => [
62
                    'auto_generate_proxy_classes' => "%kernel.debug%",
63
                    'naming_strategy' => 'doctrine.orm.naming_strategy.underscore',
64
                    'auto_mapping' => true,
65
//                    'entity_managers' => [
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
66
//                        'defualt' => ['auto_mapping' => true],
67
//                    ],
68
                ],
69
                'dbal' => [
70
                    'driver' => 'pdo_mysql',
71
                    'host' => 'localhost',
72
                    'port' => '3306',
73
                    'dbname' => 'bundle_test',
74
                    'user' => 'tests',
75
                    'password' => 'secret',
76
                    'charset' => 'UTF8',
77
                ],
78
            ]
79
        );
80
    }
81
82
    /**
83
     * Add or import routes into your application.
84
     *
85
     *     $routes->import('config/routing.yml');
86
     *     $routes->add('/admin', 'AppBundle:Admin:dashboard', 'admin_dashboard');
87
     *
88
     * @param \Symfony\Component\Routing\RouteCollectionBuilder $routes
89
     */
90
    protected function configureRoutes(\Symfony\Component\Routing\RouteCollectionBuilder $routes)
0 ignored issues
show
Unused Code introduced by
The parameter $routes is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
91
    {
92
        // TODO: Implement configureRoutes() method.
93
    }
94
}