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.

Dami   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
lcom 0
cbo 4
dl 0
loc 32
rs 10
c 1
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getContainer() 0 4 1
A __construct() 0 17 2
A get() 0 4 1
1
<?php
2
3
namespace Dami\Cli;
4
5
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\Config\FileLocator;
8
use Symfony\Component\Yaml\Yaml;
9
10
use Dami\DependencyInjection\DamiExtension;
11
use Rentgen\DependencyInjection\RentgenExtension;
12
use Rentgen\DependencyInjection\Compiler\ListenerPass;
13
use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass;
14
class Dami
15
{
16
    private $container;
17
18
    public function __construct()
19
    {
20
        $container = new ContainerBuilder();
21
22
        $extensions = array(
23
            new RentgenExtension(),
24
            new DamiExtension(),
25
        );
26
        foreach ($extensions as $extension) {
27
            $container->registerExtension($extension);
28
            $container->loadFromExtension($extension->getAlias());
29
        }
30
        $container->addCompilerPass(new RegisterListenersPass());
31
        $container->compile();
32
33
        $this->container = $container;
34
    }
35
36
    public function get($service)
37
    {
38
        return $this->container->get($service);
39
    }
40
41
    public function getContainer()
42
    {
43
        return $this->container;
44
    }
45
}
46