Message   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 7
dl 0
loc 37
c 0
b 0
f 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A payload() 0 3 1
A channel() 0 3 1
A __construct() 0 4 1
1
<?php
2
/**
3
 * Type message
4
 * User: moyo
5
 * Date: 2018/8/28
6
 * Time: 5:29 PM
7
 */
8
9
namespace Carno\Redis\Types;
10
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
46
    {
47
        return $this->payload;
48
    }
49
}
50