ExchangeBind::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
c 1
b 0
f 1
dl 0
loc 10
rs 10
ccs 5
cts 5
cp 1
cc 1
nc 1
nop 4
crap 1
1
<?php declare(strict_types = 1);
2
3
namespace Portiny\RabbitMQ\Exchange;
4
5
final class ExchangeBind
6
{
7
	/**
8
	 * @var string
9
	 */
10
	private $destination;
11
12
	/**
13
	 * @var string
14
	 */
15
	private $routingKey;
16
17
	/**
18
	 * @var bool
19
	 */
20
	private $nowait = false;
21
22
	/**
23
	 * @var array
24
	 */
25
	private $arguments = [];
26
27
28 4
	public function __construct(
29
		string $destination,
30
		string $routingKey = '',
31
		bool $nowait = false,
32
		array $arguments = []
33
	) {
34 4
		$this->destination = $destination;
35 4
		$this->routingKey = $routingKey;
36 4
		$this->nowait = $nowait;
37 4
		$this->arguments = $arguments;
38 4
	}
39
40
41 1
	public function getDestination(): string
42
	{
43 1
		return $this->destination;
44
	}
45
46
47 1
	public function getRoutingKey(): string
48
	{
49 1
		return $this->routingKey;
50
	}
51
52
53 1
	public function isNowait(): bool
54
	{
55 1
		return $this->nowait;
56
	}
57
58
59 1
	public function getArguments(): array
60
	{
61 1
		return $this->arguments;
62
	}
63
64
}
65