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.

DIContainerBuilder::build()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 9
ccs 6
cts 6
cp 1
crap 1
rs 9.9666
c 0
b 0
f 0
1
<?php
2
namespace PhpBoot\DI;
3
4
use DI\Container;
5
6
/**
7
 * Class DIContainerBuilder
8
 * @see http://php-di.org/doc/container.html
9
 */
10
class DIContainerBuilder extends \DI\ContainerBuilder
11
{
12 89
    public function __construct($containerClass = 'DI\Container')
13
    {
14 89
        parent::__construct($containerClass);
15 89
        $this->annReader = new AnnotationReader();
16 89
        $this->addDefinitions($this->annReader);
17 89
    }
18
    /**
19
     * Build and return a container.
20
     *
21
     * @return Container
22
     */
23 89
    public function build()
24
    {
25
26 89
        $this->useAutowiring(false);
27 89
        $this->useAnnotations(false);
28 89
        $container = parent::build();
29 89
        $container->call([$this->annReader, 'setLoader']);
30 89
        return $container;
31
    }
32
33
    /**
34
     * @var AnnotationReader
35
     */
36
    private $annReader;
37
}