OutboxMessage::getMessageId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
namespace PSB\Core\Outbox;
3
4
5
use PSB\Core\Util\Guard;
6
7
class OutboxMessage
8
{
9
    /**
10
     * @var string
11
     */
12
    private $messageId;
13
14
    /**
15
     * @var OutboxTransportOperation[]
16
     */
17
    private $transportOperations;
18
19
    /**
20
     * @param string                     $messageId
21
     * @param OutboxTransportOperation[] $transportOperations
22
     */
23 9
    public function __construct($messageId, array $transportOperations)
24
    {
25 9
        Guard::againstNullAndEmpty('messageId', $messageId);
26
27 8
        $this->messageId = $messageId;
28 8
        $this->transportOperations = $transportOperations;
29 8
    }
30
31
    /**
32
     * @return string
33
     */
34 5
    public function getMessageId()
35
    {
36 5
        return $this->messageId;
37
    }
38
39
    /**
40
     * @return OutboxTransportOperation[]
41
     */
42 5
    public function getTransportOperations()
43
    {
44 5
        return $this->transportOperations;
45
    }
46
}
47