GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Pull Request — master (#39)
by joseph
04:31
created

Kernel   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 59
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 9
dl 0
loc 59
c 0
b 0
f 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getLogDir() 0 3 1
A addDsmServices() 0 3 1
A getCacheDir() 0 3 1
A registerBundles() 0 6 4
1
<?php
2
3
namespace App;
4
5
use EdmondsCommerce\DoctrineStaticMeta\Container;
6
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...
7
use Symfony\Component\Config\Loader\LoaderInterface;
8
use Symfony\Component\Config\Resource\FileResource;
9
use Symfony\Component\DependencyInjection\ContainerBuilder;
10
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...
11
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...
12
13
class Kernel extends BaseKernel
14
{
15
    use MicroKernelTrait;
16
17
    const CONFIG_EXTS = '.{php,xml,yaml,yml}';
18
19
    public function getCacheDir()
20
    {
21
        return $this->getProjectDir().'/var/cache/'.$this->environment;
22
    }
23
24
    public function getLogDir()
25
    {
26
        return $this->getProjectDir().'/var/log';
27
    }
28
29
    public function registerBundles()
30
    {
31
        $contents = require $this->getProjectDir().'/config/bundles.php';
32
        foreach ($contents as $class => $envs) {
33
            if (isset($envs['all']) || isset($envs[$this->environment])) {
34
                yield new $class();
35
            }
36
        }
37
    }
38
39
    protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader)
40
    {
41
        $container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php'));
42
        // Feel free to remove the "container.autowiring.strict_mode" parameter
43
        // if you are using symfony/dependency-injection 4.0+ as it's the default behavior
44
        $container->setParameter('container.autowiring.strict_mode', true);
45
        $container->setParameter('container.dumper.inline_class_loader', true);
46
        $confDir = $this->getProjectDir().'/config';
47
48
        $loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob');
49
        $loader->load($confDir.'/{packages}/'.$this->environment.'/**/*'.self::CONFIG_EXTS, 'glob');
50
        $loader->load($confDir.'/{services}'.self::CONFIG_EXTS, 'glob');
51
        $loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob');
52
53
        $this->addDsmServices($container);
54
    }
55
56
    /**
57
     * @param ContainerBuilder $container
58
     * @throws \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
59
     */
60
    protected function addDsmServices(ContainerBuilder $container)
61
    {
62
        (new Container())->addConfiguration($container, $_SERVER);
63
    }
64
65
    protected function configureRoutes(RouteCollectionBuilder $routes)
66
    {
67
        $confDir = $this->getProjectDir().'/config';
68
69
        $routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob');
70
        $routes->import($confDir.'/{routes}/'.$this->environment.'/**/*'.self::CONFIG_EXTS, '/', 'glob');
71
        $routes->import($confDir.'/{routes}'.self::CONFIG_EXTS, '/', 'glob');
72
    }
73
}
74