Completed
Push — master ( b3457c...c694d9 )
by Phil
02:30
created

ContainerAwareTrait::setContainer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
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|null
11
     */
12
    protected $container;
13
14
    /**
15
     * {@inheritdoc}
16
     */
17 22
    public function getContainer() : ?ContainerInterface
18
    {
19 22
        return $this->container;
20
    }
21
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function setContainer(ContainerInterface $container) : ContainerAwareInterface
26
    {
27
        $this->container = $container;
28
29
        return $this;
30
    }
31
}
32