OutgoingOptions   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 69
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 0
dl 0
loc 69
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A requireImmediateDispatch() 0 5 1
A isImmediateDispatchEnabled() 0 4 1
A setMessageId() 0 5 1
A getMessageId() 0 4 1
A setOutgoingHeaders() 0 4 1
A getOutgoingHeaders() 0 4 1
1
<?php
2
namespace PSB\Core;
3
4
5
abstract class OutgoingOptions
6
{
7
    /**
8
     * @var bool
9
     */
10
    private $immediateDispatch = false;
11
12
    /**
13
     * @var string
14
     */
15
    private $messageId;
16
17
    /**
18
     * @var array
19
     */
20
    private $outgoingHeaders = [];
21
22
    /**
23
     * @return $this
24
     */
25 1
    public function requireImmediateDispatch()
26
    {
27 1
        $this->immediateDispatch = true;
28 1
        return $this;
29
    }
30
31
    /**
32
     * @return bool
33
     */
34 1
    public function isImmediateDispatchEnabled()
35
    {
36 1
        return $this->immediateDispatch;
37
    }
38
39
    /**
40
     * @param string $messageId
41
     *
42
     * @return $this
43
     */
44 23
    public function setMessageId($messageId)
45
    {
46 23
        $this->messageId = $messageId;
47 23
        return $this;
48
    }
49
50
    /**
51
     * @return string
52
     */
53 23
    public function getMessageId()
54
    {
55 23
        return $this->messageId;
56
    }
57
58
    /**
59
     * @param array $headers
60
     */
61 1
    public function setOutgoingHeaders(array $headers)
62
    {
63 1
        $this->outgoingHeaders = $headers;
64 1
    }
65
66
    /**
67
     * @return array
68
     */
69 23
    public function getOutgoingHeaders()
70
    {
71 23
        return $this->outgoingHeaders;
72
    }
73
}
74