Total Complexity | 3 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | class Message |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private $channel = null; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $payload = null; |
||
22 | |||
23 | /** |
||
24 | * Message constructor. |
||
25 | * @param string $channel |
||
26 | * @param string $payload |
||
27 | */ |
||
28 | public function __construct(string $channel, string $payload) |
||
29 | { |
||
30 | $this->channel = $channel; |
||
31 | $this->payload = $payload; |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * @return string |
||
36 | */ |
||
37 | public function channel() : string |
||
38 | { |
||
39 | return $this->channel; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @return string |
||
44 | */ |
||
45 | public function payload() : string |
||
48 | } |
||
49 | } |
||
50 |