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

ContainerAwareTrait   A

Coupling/Cohesion

Components 0
Dependencies 0

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 31
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getContainer() 0 4 1
A setContainer() 0 6 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