OutgoingOptions::setOutgoingHeaders()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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