Completed
Push — master ( 10575c...1b914b )
by Korotkov
04:08 queued 02:36
created

SetContainerTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 22
rs 10
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    : Jagepard <[email protected]">
7
 * @copyright Copyright (c) 2019, Jagepard
8
 * @license   https://mit-license.org/ MIT
9
 */
10
11
namespace Rudra\Container\Traits;
12
13
use Rudra\Container\Interfaces\ApplicationInterface;
14
15
trait SetContainerTrait
16
{
17
    /**
18
     * @var ApplicationInterface
19
     */
20
    private $container;
21
22
    /**
23
     * SetContainerTrait constructor.
24
     * @param ApplicationInterface $container
25
     */
26
    public function __construct(ApplicationInterface $container)
27
    {
28
        $this->container = $container;
29
    }
30
31
    /**
32
     * @return ApplicationInterface
33
     */
34
    public function container(): ApplicationInterface
35
    {
36
        return $this->container;
37
    }
38
}
39