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   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 20
ccs 0
cts 13
cp 0
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getContainer() 0 7 1
A getContainerSingleton() 0 7 2
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