Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Push — 0.9 ( a570a9...daefb7 )
by Jérémiah
26:10
created

TestKernel::process()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 2
eloc 3
nc 2
nop 1
1
<?php
2
3
/*
4
 * This file is part of the OverblogGraphQLBundle package.
5
 *
6
 * (c) Overblog <http://github.com/overblog/>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Overblog\GraphQLBundle\Tests\Functional\App;
13
14
use Overblog\GraphQLBundle\OverblogGraphQLBundle;
15
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
16
use Symfony\Bundle\SecurityBundle\SecurityBundle;
17
use Symfony\Bundle\TwigBundle\TwigBundle;
18
use Symfony\Component\Config\Loader\LoaderInterface;
19
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
20
use Symfony\Component\DependencyInjection\ContainerBuilder;
21
use Symfony\Component\HttpKernel\Kernel;
22
23
final class TestKernel extends Kernel implements CompilerPassInterface
24
{
25
    private $testCase;
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function registerBundles()
31
    {
32
        return [
33
            new FrameworkBundle(),
34
            new SecurityBundle(),
35
            new TwigBundle(),
36
            new OverblogGraphQLBundle(),
37
        ];
38
    }
39
40
    public function __construct($environment, $debug, $testCase = null)
41
    {
42
        $this->testCase = null !== $testCase ? $testCase : false;
43
        parent::__construct($environment, $debug);
44
    }
45
46
    public function getCacheDir()
47
    {
48
        return sys_get_temp_dir().'/OverblogGraphQLBundle/'.Kernel::VERSION.'/'.$this->testCase.'/cache/'.$this->environment;
49
    }
50
51
    public function getLogDir()
52
    {
53
        return sys_get_temp_dir().'/OverblogGraphQLBundle/'.Kernel::VERSION.'/'.$this->testCase.'/logs';
54
    }
55
56
    public function getRootDir()
57
    {
58
        return __DIR__;
59
    }
60
61
    public function isBooted()
62
    {
63
        return $this->booted;
64
    }
65
66
    /**
67
     * {@inheritdoc}
68
     */
69
    public function registerContainerConfiguration(LoaderInterface $loader)
70
    {
71
        if ($this->testCase) {
72
            $loader->load(sprintf(__DIR__.'/config/%s/config.yml', $this->testCase));
73
        } else {
74
            $loader->load(__DIR__.'/config/config.yml');
75
        }
76
77
        $loader->load(function (ContainerBuilder $container) {
78
            $container->addCompilerPass($this);
79
        });
80
    }
81
82
    /**
83
     * {@inheritdoc}
84
     */
85
    public function process(ContainerBuilder $container)
86
    {
87
        // disabled http_exception_listener because it flatten exception to html response
88
        if ($container->has('http_exception_listener')) {
89
            $container->removeDefinition('http_exception_listener');
90
        }
91
    }
92
}
93