Kernel::getCacheDir()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App;
6
7
use App\Infrastructure\Common\BusPass;
8
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
0 ignored issues
show
Bug introduced by
The type Doctrine\Bundle\DoctrineBundle\DoctrineBundle 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...
9
use Prooph\Bundle\EventStore\ProophEventStoreBundle;
0 ignored issues
show
Bug introduced by
The type Prooph\Bundle\EventStore\ProophEventStoreBundle 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...
10
use Prooph\Bundle\ServiceBus\ProophServiceBusBundle;
0 ignored issues
show
Bug introduced by
The type Prooph\Bundle\ServiceBus\ProophServiceBusBundle 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...
11
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
0 ignored issues
show
Bug introduced by
The type Symfony\Bundle\Framework...Kernel\MicroKernelTrait 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\Bundle\MonologBundle\MonologBundle;
0 ignored issues
show
Bug introduced by
The type Symfony\Bundle\MonologBundle\MonologBundle 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...
13
use Symfony\Component\Config\Loader\LoaderInterface;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Config\Loader\LoaderInterface 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...
14
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...
15
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\HttpKernel\Kernel 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...
16
use Symfony\Component\Routing\RouteCollectionBuilder;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Routing\RouteCollectionBuilder 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...
17
18
class Kernel extends BaseKernel
19
{
20
    use MicroKernelTrait;
21
22
    public function registerBundles(): array
23
    {
24
        $bundles = [
25
            new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
0 ignored issues
show
Bug introduced by
The type Symfony\Bundle\FrameworkBundle\FrameworkBundle 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...
26
            new MonologBundle(),
27
            new DoctrineBundle(),
28
            new ProophEventStoreBundle(),
29
            new ProophServiceBusBundle(),
30
        ];
31
32
//        if ($this->getEnvironment() == 'dev') {
33
//
34
//        }
35
36
        return $bundles;
37
    }
38
39
    protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader): void
40
    {
41
        $loader->load(__DIR__.'/../config/package/framework.yaml');
42
        $loader->load(__DIR__.'/../config/package/monolog.yaml');
43
        $loader->load(__DIR__.'/../config/package/doctrine.yaml');
44
        $loader->load(__DIR__.'/../config/package/prooph_event_store.yaml');
45
        $loader->load(__DIR__.'/../config/package/prooph_service_bus.yaml');
46
        $loader->load(__DIR__.'/../config/services.yml');
47
48
        // configure WebProfilerBundle only if the bundle is enabled
49
        if (isset($this->bundles['WebProfilerBundle'])) {
50
            $c->loadFromExtension('web_profiler', [
51
                'toolbar' => true,
52
                'intercept_redirects' => false,
53
            ]);
54
        }
55
        $c->addCompilerPass(new BusPass());
56
    }
57
58
    protected function configureRoutes(RouteCollectionBuilder $routes): string
59
    {
60
        // load the annotation routes
61
//        $routes->import(__DIR__.'/../src/Controller/', '/', 'annotation');
62
    }
0 ignored issues
show
Bug Best Practice introduced by
In this branch, the function will implicitly return null which is incompatible with the type-hinted return string. Consider adding a return statement or allowing null as return value.

For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example:

interface ReturnsInt {
    public function returnsIntHinted(): int;
}

class MyClass implements ReturnsInt {
    public function returnsIntHinted(): int
    {
        if (foo()) {
            return 123;
        }
        // here: null is implicitly returned
    }
}
Loading history...
63
64
    // optional, to use the standard Symfony cache directory
65
    public function getCacheDir()
66
    {
67
        return __DIR__.'/../var/cache/'.$this->getEnvironment();
68
    }
69
70
    // optional, to use the standard Symfony logs directory
71
    public function getLogDir()
72
    {
73
        return __DIR__.'/../var/log';
74
    }
75
76
    public function boot(): ?Kernel
77
    {
78
        return parent::boot(); // TODO: Change the autogenerated stub
79
    }
80
}
81