TransportReceiver::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 5
cts 5
cp 1
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 1
1
<?php
2
namespace PSB\Core\Transport;
3
4
5
class TransportReceiver
6
{
7
    /**
8
     * @var MessagePusherInterface
9
     */
10
    private $messagePusher;
11
12
    /**
13
     * @var PushSettings
14
     */
15
    private $pushSettings;
16
17
    /**
18
     * @var PushPipe
19
     */
20
    private $pushPipe;
21
22
    /**
23
     * @param MessagePusherInterface $messagePusher
24
     * @param PushSettings           $pushSettings
25
     * @param PushPipe               $pushPipe
26
     */
27 1
    public function __construct(
28
        MessagePusherInterface $messagePusher,
29
        PushSettings $pushSettings,
30
        PushPipe $pushPipe
31
    ) {
32 1
        $this->messagePusher = $messagePusher;
33 1
        $this->pushSettings = $pushSettings;
34 1
        $this->pushPipe = $pushPipe;
35 1
    }
36
37 1
    public function start()
38
    {
39 1
        $this->messagePusher->init($this->pushPipe, $this->pushSettings);
40 1
        $this->messagePusher->start();
41 1
    }
42
}
43