Core::container()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BinaryCube\CarrotMQ;
6
7
use Psr\Log\LoggerInterface;
8
9
/**
10
 * Class Core
11
 */
12
abstract class Core extends Component
13
{
14
15
    /**
16
     * @var Container
17
     */
18
    protected $container;
19
20
    /**
21
     * Constructor.
22
     *
23
     * @param string               $id
24
     * @param Container            $container
25
     * @param LoggerInterface|null $logger
26
     */
27
    public function __construct(string $id, Container $container, $logger = null)
28
    {
29
        parent::__construct($id, $logger);
30
31
        $this->container = $container;
32
    }
33
34
    /**
35
     * @return Container
36
     */
37
    public function container()
38
    {
39
        return $this->container;
40
    }
41
42
}
43