ContainerAwareTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getContainer() 0 4 1
A setContainer() 0 6 1
1
<?php
2
3
namespace Thruster\Component\Container;
4
5
/**
6
 * Trait ContainerAwareTrait
7
 *
8
 * @package Thruster\Component\Container
9
 * @author  Aurimas Niekis <[email protected]>
10
 */
11
trait ContainerAwareTrait
12
{
13
    /**
14
     * @var Container
15
     */
16
    private $container;
17
18
    /**
19
     * @return Container
20
     */
21 1
    public function getContainer() : Container
22
    {
23 1
        return $this->container;
24
    }
25
26
    /**
27
     * @param Container $container
28
     *
29
     * @return $this
30
     */
31 1
    public function setContainer(Container $container)
32
    {
33 1
        $this->container = $container;
34
35 1
        return $this;
36
    }
37
}
38