TransportReceiver   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 38
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A start() 0 5 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