Completed
Pull Request — master (#178)
by Phil
01:48
created

ContainerAwareTrait::getContainer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php declare(strict_types=1);
2
3
namespace League\Route;
4
5
use Psr\Container\ContainerInterface;
6
7
trait ContainerAwareTrait
8
{
9
    /**
10
     * @var \Psr\Container\ContainerInterface
11
     */
12
    protected $container;
13
14
    /**
15
     * Get container.
16
     *
17
     * @return ?\Psr\Container\ContainerInterface
0 ignored issues
show
Documentation introduced by
The doc-type ?\Psr\Container\ContainerInterface could not be parsed: Unknown type name "?\Psr\Container\ContainerInterface" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
18
     */
19 21
    public function getContainer() : ?ContainerInterface
20
    {
21 21
        return $this->container;
22
    }
23
24
    /**
25
     * Set container.
26
     *
27
     * @param \Psr\Container\ContainerInterface $container
28
     *
29
     * @return \League\Route\ContainerAwareInterface
30
     */
31
    public function setContainer(ContainerInterface $container) : ContainerAwareInterface
32
    {
33
        $this->container = $container;
34
35
        return $this;
36
    }
37
}
38