| Total Complexity | 6 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 22 | trait ContainerAwareTrait |
||
| 23 | { |
||
| 24 | private $container = null; |
||
| 25 | |||
| 26 | 2 | public function __construct(ContainerInterface $container = null) |
|
| 27 | { |
||
| 28 | 2 | $this->container = $container; |
|
| 29 | 2 | } |
|
| 30 | |||
| 31 | 1 | public function getContainer() : ContainerInterface |
|
| 32 | { |
||
| 33 | 1 | return $this->container; |
|
| 34 | } |
||
| 35 | |||
| 36 | |||
| 37 | 1 | public function setContainer(ContainerInterface $container) : self |
|
| 38 | { |
||
| 39 | 1 | $this->container = $container; |
|
| 40 | |||
| 41 | 1 | return $this; |
|
| 42 | } |
||
| 43 | |||
| 44 | |||
| 45 | /** |
||
| 46 | * A shortcut to get a value with a default |
||
| 47 | */ |
||
| 48 | 2 | public function containerGet(String $id, $value = null) |
|
| 53 | } |
||
| 54 | } |
||
| 55 |