Passed
Pull Request — master (#12)
by Korotkov
01:40
created

SetContainerTrait::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @author    : Korotkov Danila <[email protected]>
7
 * @copyright Copyright (c) 2018, Korotkov Danila
8
 * @license   http://www.gnu.org/licenses/gpl.html GNU GPLv3.0
9
 */
10
11
namespace Rudra\ExternalTraits;
12
13
use Rudra\Interfaces\ContainerInterface;
14
15
/**
16
 * Trait SetContainerTrait
17
 * @package Rudra\ExternalTraits
18
 */
19
trait SetContainerTrait
20
{
21
22
    /**
23
     * @var ContainerInterface
24
     */
25
    protected $container;
26
27
    /**
28
     * SetContainerTrait constructor.
29
     * @param ContainerInterface $container
30
     */
31
    public function __construct(ContainerInterface $container)
32
    {
33
        $this->container = $container;
34
    }
35
36
    /**
37
     * @return ContainerInterface
38
     */
39
    public function container(): ContainerInterface
40
    {
41
        return $this->container;
42
    }
43
}
44