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 (#328)
by Martin
01:35
created

PsrContainerAwareRouter::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace Bernard\Router;
4
5
use Psr\Container\ContainerInterface;
6
7
/**
8
 * @package Bernard\Router
9
 */
10
class PsrContainerAwareRouter extends SimpleRouter
11
{
12
    /**
13
     * @var ContainerInterface
14
     */
15
    private $container;
16
17
    /**
18
     * @param ContainerInterface $container
19
     * @param array              $receivers
20
     */
21
    public function __construct(ContainerInterface $container, array $receivers = [])
22
    {
23
        $this->container = $container;
24
25
        parent::__construct($receivers);
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    protected function get($name)
32
    {
33
        $serviceId = parent::get($name);
34
35
        return $this->container->get($serviceId);
36
    }
37
38
    /**
39
     * {@inheritdoc}
40
     */
41
    protected function accepts($receiver)
42
    {
43
        return $this->container->has($receiver);
44
    }
45
}
46