Passed
Branch master (74fab5)
by Kunal
03:19
created

ConsumeConfig::__construct()   A

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
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 2
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Kunnu\RabbitMQ;
4
5
use Illuminate\Support\Collection;
6
7
class ConsumeConfig extends Collection
8
{
9
    /**
10
     * Connection Configuration.
11
     *
12
     * @var ConnectionConfig|null $connectionConfig
13
     */
14
    protected ?ConnectionConfig $connectionConfig;
15
16
    /**
17
     * Create a new ConsumeConfig instance.
18
     *
19
     * @param array $config
20
     * @param ConnectionConfig|null $connectionConfig
21
     */
22
    public function __construct(array $config = [], ?ConnectionConfig $connectionConfig = null)
23
    {
24
        parent::__construct($config);
25
        $this->connectionConfig = $connectionConfig;
26
    }
27
28
    /**
29
     * Get connection config.
30
     *
31
     * @return ConnectionConfig|null
32
     */
33
    public function getConnectionConfig(): ?ConnectionConfig
34
    {
35
        return $this->connectionConfig;
36
    }
37
}
38