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.

TestCase::tearDownAfterClass()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * This file is part of the Global Trading Technologies Ltd workflow-extension-bundle package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * (c) fduch <[email protected]>
9
 * @date 29.06.16
10
 */
11
12
namespace Gtt\Bundle\WorkflowExtensionsBundle\Tests\Functional;
13
14
use Gtt\Bundle\WorkflowExtensionsBundle\Tests\Functional\Kernel\KernelBuilder;
15
use Gtt\Bundle\WorkflowExtensionsBundle\Tests\Functional\Kernel\TestKernelInterface;
16
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
17
use Symfony\Component\Filesystem\Filesystem;
18
19
class TestCase extends BaseWebTestCase
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public static function tearDownAfterClass()
25
    {
26
        static::deleteTmpDirs();
27
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32
    protected static function getKernelClass()
33
    {
34
        if (defined("KERNEL_CLASS")) {
35
            return KERNEL_CLASS;
36
        } else {
37
            return null;
38
        }
39
    }
40
41
    /**
42
     * {@inheritdoc}
43
     */
44
    protected static function createKernel(array $options = array())
45
    {
46
        return KernelBuilder::getKernel(static::getKernelClass(), $options);
47
    }
48
49
    /**
50
     * Clears temporary test kernel application folder in case of kernel implements TestKernelInterface
51
     * @see TestKernelInterface::getTempAppDir
52
     *
53
     * @return void
54
     */
55
    protected static function deleteTmpDirs()
56
    {
57
        if (static::$kernel) {
58
            $kernel = static::$kernel;
59
            $fs = new Filesystem();
60
            if ($kernel instanceof TestKernelInterface) {
61
                $fs->remove($kernel->getTempAppDir());
62
            }
63
        }
64
    }
65
}