Passed
Pull Request — master (#10)
by Korotkov
01:41
created

SetContainerTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

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