Completed
Push — master ( 2ab45b...aa8da2 )
by Korotkov
03:07
created

SetContainerTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 26
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A container() 0 4 1
1
<?php
2
3
declare(strict_types = 1);
4
5
/**
6
 * Date: 21.04.2017
7
 * Time: 11:40
8
 *
9
 * @author    : Korotkov Danila <[email protected]>
10
 * @copyright Copyright (c) 2016, Korotkov Danila
11
 * @license   http://www.gnu.org/licenses/gpl.html GNU GPLv3.0
12
 */
13
14
namespace Rudra\Container;
15
16
/**
17
 * trait SetContainerTrait
18
 *
19
 * @package Rudra
20
 */
21
trait SetContainerTrait
22
{
23
24
    /**
25
     * @var ContainerInterface
26
     */
27
    protected $container;
28
29
    /**
30
     * Middleware constructor.
31
     *
32
     * @param ContainerInterface $container
33
     */
34
    public function __construct(ContainerInterface $container)
35
    {
36
        $this->container = $container;
37
    }
38
39
    /**
40
     * @return ContainerInterface
41
     */
42
    public function container(): ContainerInterface
43
    {
44
        return $this->container;
45
    }
46
}
47