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.

TestContainerFactory   A
last analyzed

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
2
3
declare(strict_types=1);
4
5
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Testing;
6
7
use EdmondsCommerce\DoctrineStaticMeta\Container;
8
use Psr\Container\ContainerInterface;
9
use Symfony\Component\DependencyInjection\ContainerBuilder;
10
11
class TestContainerFactory
12
{
13
    private static $container;
14
15
    public static function getContainerSingleton(array $config): ContainerInterface
16
    {
17
        if (null === self::$container) {
18
            self::$container = self::getContainer($config);
19
        }
20
21
        return self::$container;
22
    }
23
24
    public static function getContainer(array $config): ContainerInterface
25
    {
26
        $containerBuilder = new ContainerBuilder();
27
        (new Container())->addConfiguration($containerBuilder, $config);
28
        $containerBuilder->compile();
29
30
        return $containerBuilder;
31
    }
32
}
33