Passed
Push — master ( b1e5d1...ef5230 )
by Timo
02:19
created

HasContainerTrait::setContainer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * This file is part of the phpspec-behavior package.
4
 * (c) 2017 Timo Michna <timomichna/yahoo.de>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Tidal\PhpSpec\BehaviorExtension\Behavior\Container;
11
12
use PhpSpec\ServiceContainer;
13
14
/**
15
 * trait Tidal\PhpSpec\BehaviorExtension\Behavior\Container\HasContainerTrait
16
 */
17
trait HasContainerTrait
18
{
19
    /**
20
     * @var ServiceContainer
21
     */
22
    private $container;
23
24
    /**
25
     * @param ServiceContainer $container
26
     */
27
    public function setContainer(ServiceContainer $container)
28
    {
29
        $this->container = $container;
30
    }
31
32
    /**
33
     * @return ServiceContainer
34
     */
35
    public function getContainer(): ServiceContainer
36
    {
37
        return $this->container;
38
    }
39
}
40
41