ContainerAwareTrait::setContainer()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/*
3
 * This file is part of the Borobudur-DependencyInjection package.
4
 *
5
 * (c) Hexacodelabs <http://hexacodelabs.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Borobudur\DependencyInjection;
12
13
/**
14
 * @author      Iqbal Maulana <[email protected]>
15
 * @created     8/9/15
16
 */
17
trait ContainerAwareTrait
18
{
19
    /**
20
     * @var ContainerInterface
21
     */
22
    protected $container;
23
24
    /**
25
     * Set container.
26
     *
27
     * @param ContainerInterface|null $container
28
     */
29
    public function setContainer(ContainerInterface $container = null)
30
    {
31
        $this->container = $container;
32
    }
33
}
34