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.
Completed
Pull Request — master (#241)
by Sergii
06:03
created

ServiceContainer::load()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 9
c 1
b 0
f 0
ccs 7
cts 7
cp 1
rs 9.6666
cc 1
eloc 6
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the php-phantomjs.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
namespace JonnyW\PhantomJs\DependencyInjection;
10
11
use Symfony\Component\DependencyInjection\ContainerBuilder;
12
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
13
use Symfony\Component\Config\FileLocator;
14
15
/**
16
 * PHP PhantomJs
17
 *
18
 * @author Jon Wenmoth <[email protected]>
19
 */
20
class ServiceContainer extends ContainerBuilder
21
{
22
    /**
23
     * Service container instance
24
     *
25
     * @var static
26
     * @access private
27
     */
28
    private static $instance;
29
30
    /**
31
     * Get singleton instance
32
     *
33
     * @access public
34
     * @return static
35
     */
36 43
    public static function getInstance()
37
    {
38 43
        if (null === self::$instance) {
39 1
            self::$instance = new static();
40
41 1
            $loader = new YamlFileLoader(self::$instance, new FileLocator(__DIR__.'/../Resources/config'));
42 1
            $loader->load('config.yml');
43 1
            $loader->load('services.yml');
44
45 1
            self::$instance->setParameter('phantomjs.cache_dir', sys_get_temp_dir());
46 1
            self::$instance->setParameter('phantomjs.resource_dir', __DIR__.'/../Resources');
47 1
        }
48
49 43
        return self::$instance;
50
    }
51
}
52