Passed
Push — 6.5.0.0 ( 85bd4e...fe6596 )
by Christian
24:46 queued 09:10
created

Kernel::getLogDir()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
declare(strict_types=1);
3
4
namespace App;
5
6
use Shopware\Core\Framework\Log\Package;
7
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
8
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
9
use Symfony\Bundle\TwigBundle\TwigBundle;
10
use Symfony\Component\Config\Loader\LoaderInterface;
11
use Symfony\Component\DependencyInjection\ContainerBuilder;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Depend...ection\ContainerBuilder was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
13
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
14
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
15
16
/**
17
 * @internal
18
 */
19
#[Package('core')]
20
class Kernel extends BaseKernel
21
{
22
    use MicroKernelTrait;
0 ignored issues
show
introduced by
The trait Symfony\Bundle\Framework...Kernel\MicroKernelTrait requires some properties which are not provided by App\Kernel: $instanceof, $name
Loading history...
23
24
    /**
25
     * @return BundleInterface[]
26
     */
27
    public function registerBundles(): array
28
    {
29
        return [
30
            new FrameworkBundle(),
31
            new TwigBundle(),
32
        ];
33
    }
34
35
    public function getProjectDir(): string
36
    {
37
        return __DIR__;
38
    }
39
40
    public function getLogDir(): string
41
    {
42
        return $this->getCacheDir();
43
    }
44
45
    public function getCacheDir(): string
46
    {
47
        return sys_get_temp_dir() . '/shopware-recovery/';
48
    }
49
50
    protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void
0 ignored issues
show
Unused Code introduced by
The parameter $container is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

50
    protected function configureContainer(/** @scrutinizer ignore-unused */ ContainerBuilder $container, LoaderInterface $loader): void

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

Loading history...
51
    {
52
        $loader->load(__DIR__ . '/Resources/config/config.yml');
53
    }
54
55
    protected function configureRoutes(RoutingConfigurator $routes): void
56
    {
57
        $routes->import(__DIR__ . '/Controller');
58
    }
59
}
60