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 (#138)
by joseph
96:08 queued 65:06
created

TestContainerFactory::getContainer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 7
ccs 0
cts 6
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Testing;
4
5
use EdmondsCommerce\DoctrineStaticMeta\Container;
6
use Psr\Container\ContainerInterface;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
9
class TestContainerFactory
10
{
11
    private static $container;
12
13
    public static function getContainerSingleton(array $config): ContainerInterface
14
    {
15
        if (null === self::$container) {
16
            self::$container = self::getContainer($config);
17
        }
18
19
        return self::$container;
20
    }
21
22
    public static function getContainer(array $config): ContainerInterface
23
    {
24
        $containerBuilder = new ContainerBuilder();
25
        (new Container())->addConfiguration($containerBuilder, $config);
26
        $containerBuilder->compile();
27
28
        return $containerBuilder;
29
    }
30
}
31