Test Failed
Push — master ( 159af9...b2d1de )
by Banciu N. Cristian Mihai
03:26
created

Container::logger()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 19
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 19
rs 9.9332
cc 3
nc 3
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BinaryCube\CarrotMQ;
6
7
use BinaryCube\CarrotMQ\Collection\QueueRepository;
8
use BinaryCube\CarrotMQ\Collection\TopicRepository;
9
use BinaryCube\CarrotMQ\Collection\ConsumerRepository;
10
use BinaryCube\CarrotMQ\Collection\PublisherRepository;
11
use BinaryCube\CarrotMQ\Collection\ConnectionRepository;
12
13
/**
14
 * Class Container
15
 */
16
class Container
17
{
18
19
    /**
20
     * @var ConnectionRepository
21
     */
22
    private $connections;
23
24
    /**
25
     * @var TopicRepository
26
     */
27
    private $topics;
28
29
    /**
30
     * @var QueueRepository
31
     */
32
    private $queues;
33
34
    /**
35
     * @var PublisherRepository
36
     */
37
    private $publishers;
38
39
    /**
40
     * @var ConsumerRepository
41
     */
42
    private $consumers;
43
44
    /**
45
     * Constructor.
46
     */
47
    public function __construct()
48
    {
49
        $this->connections = new ConnectionRepository();
50
        $this->topics      = new TopicRepository();
51
        $this->queues      = new QueueRepository();
52
        $this->publishers  = new PublisherRepository();
53
        $this->consumers   = new ConsumerRepository();
54
    }
55
56
    /**
57
     * @return ConnectionRepository
58
     */
59
    public function connections(): ConnectionRepository
60
    {
61
        return $this->connections;
62
    }
63
64
    /**
65
     * @return TopicRepository
66
     */
67
    public function topics(): TopicRepository
68
    {
69
        return $this->topics;
70
    }
71
72
    /**
73
     * @return QueueRepository
74
     */
75
    public function queues(): QueueRepository
76
    {
77
        return $this->queues;
78
    }
79
80
    /**
81
     * @return PublisherRepository
82
     */
83
    public function publishers(): PublisherRepository
84
    {
85
        return $this->publishers;
86
    }
87
88
    /**
89
     * @return ConsumerRepository
90
     */
91
    public function consumers(): ConsumerRepository
92
    {
93
        return $this->consumers;
94
    }
95
96
}
97