Completed
Push — master ( 76453f...1c4278 )
by Julien
06:31
created

ZMQPushServer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 23
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A send() 0 4 1
1
<?php
2
3
namespace Eole\Sandstone\Push\Bridge\ZMQ;
4
5
use ZMQSocket;
6
use Eole\Sandstone\Push\PushServerInterface;
7
8
class ZMQPushServer implements PushServerInterface
9
{
10
    /**
11
     * @var ZMQSocket
12
     */
13
    private $zmqSocket;
14
15
    /**
16
     * @param ZMQSocket $zmqSocket
17
     */
18
    public function __construct(ZMQSocket $zmqSocket)
19
    {
20
        $this->zmqSocket = $zmqSocket;
21
    }
22
23
    /**
24
     * {@InheritDoc}
25
     */
26
    public function send($message)
27
    {
28
        $this->zmqSocket->send($message);
29
    }
30
}
31