SendOptions   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 2
cbo 2
dl 0
loc 43
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setExplicitDestination() 0 6 1
A getExplicitDestination() 0 4 1
A routeToLocalEndpointInstance() 0 4 1
A isRoutedToLocalInstance() 0 4 1
1
<?php
2
namespace PSB\Core;
3
4
5
use PSB\Core\Util\Guard;
6
7
class SendOptions extends OutgoingOptions
8
{
9
    /**
10
     * @var string|null
11
     */
12
    private $destination;
13
14
    /**
15
     * @var bool
16
     */
17
    private $isRoutedToLocalInstance = false;
18
19
    /**
20
     * @param string $destination
21
     */
22 2
    public function setExplicitDestination($destination)
23
    {
24 2
        Guard::againstNullAndEmpty('destination', $destination);
25
26 2
        $this->destination = $destination;
27 2
    }
28
29
    /**
30
     * @return string|null
31
     */
32 4
    public function getExplicitDestination()
33
    {
34 4
        return $this->destination;
35
    }
36
37 2
    public function routeToLocalEndpointInstance()
38
    {
39 2
        $this->isRoutedToLocalInstance = true;
40 2
    }
41
42
    /**
43
     * @return bool
44
     */
45 4
    public function isRoutedToLocalInstance()
46
    {
47 4
        return $this->isRoutedToLocalInstance;
48
    }
49
}
50