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.

ServiceContainer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 3
dl 0
loc 32
ccs 10
cts 10
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getInstance() 0 15 2
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