Passed
Push — master ( 03e013...bd5966 )
by Anatoly
01:18 queued 14s
created

ContainerAwareTrait::getContainer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
nc 1
nop 0
dl 0
loc 3
c 1
b 0
f 0
cc 1
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php declare(strict_types=1);
2
3
namespace App;
4
5
/**
6
 * Import classes
7
 */
8
use Psr\Container\ContainerInterface;
9
10
/**
11
 * ContainerAwareTrait
12
 */
13
trait ContainerAwareTrait
14
{
15
16
    /**
17
     * The application container
18
     *
19
     * @Inject
20
     *
21
     * @var ContainerInterface
22
     */
23
    protected $container;
24
25
    /**
26
     * Gets the application container
27
     *
28
     * @return ContainerInterface
29
     */
30
    public function getContainer() : ContainerInterface
31
    {
32
        return $this->container;
33
    }
34
}
35