Completed
Push — master ( e223e2...f24f84 )
by Phil
21:43 queued 19:48
created

ContainerAwareTrait::setContainer()   A

Complexity

Conditions 1
Paths 1

Duplication

Lines 0
Ratio 0 %

Size

Total Lines 6
Code Lines 3

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
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
18
     */
19 6
    public function getContainer()
20
    {
21 6
        return $this->container;
22
    }
23
24
    /**
25
     * Set container.
26
     *
27
     * @param \Psr\Container\ContainerInterface $container
28
     *
29
     * @return self
30
     */
31 27
    public function setContainer(ContainerInterface $container)
32
    {
33 27
        $this->container = $container;
34
35 27
        return $this;
36
    }
37
}
38