OutboxTransportOperationFactory::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 6
cts 6
cp 1
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 1
1
<?php
2
namespace PSB\Core\Outbox;
3
4
5
use PSB\Core\Transport\OutgoingPhysicalMessage;
6
7
class OutboxTransportOperationFactory
8
{
9
    /**
10
     * @param OutgoingPhysicalMessage $physicalMessage
11
     * @param array                   $options
12
     *
13
     * @return OutboxTransportOperation
14
     */
15 1
    public function create(OutgoingPhysicalMessage $physicalMessage, array $options)
16
    {
17 1
        return new OutboxTransportOperation(
18 1
            $physicalMessage->getMessageId(),
19 1
            $options,
20 1
            $physicalMessage->getBody(),
21 1
            $physicalMessage->getHeaders()
22
        );
23
    }
24
}
25