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.

DIMetaLoader::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace PhpBoot\DI;
4
5
use DI\Definition\ObjectDefinition;
6
use Doctrine\Common\Cache\Cache;
7
use PhpBoot\Annotation\ContainerBuilder;
8
use PhpBoot\DI\Annotations\InjectAnnotationHandler;
9
use PhpBoot\DI\Annotations\VarAnnotationHandler;
10
11
class DIMetaLoader extends ContainerBuilder
12
{
13
    static $DEFAULT_ANNOTATIONS=[
14
        [VarAnnotationHandler::class, "properties.*.children[?name=='var'][]"],
15
        [InjectAnnotationHandler::class, "properties.*.children[?name=='inject'][]"]
16
    ];
17
18
19 89
    public function __construct(Cache $cache)
20
    {
21 89
        parent::__construct(self::$DEFAULT_ANNOTATIONS, $cache);
22 89
    }
23
24
    /**
25
     * @param string $className
26
     * @return object
27
     */
28 16
    protected function createContainer($className)
29
    {
30 16
        $res = new ObjectDefinitionContext();
31 16
        $res->definition = new ObjectDefinition($className);
32 16
        return $res;
33
    }
34
35
    protected function getHandler($handlerName, $container)
36
    {
37
        return new $handlerName($container);
38
    }
39
}