Completed
Push — 4.x ( bbb92b...3cece6 )
by Phil
32:45 queued 30:00
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 ContainerInterface|null
11
     */
12
    protected $container;
13
14
    /**
15
     * {@inheritdoc}
16
     */
17 36
    public function getContainer(): ?ContainerInterface
18
    {
19 36
        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