Message::__toString()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Type message
4
 * User: moyo
5
 * Date: 17/11/2017
6
 * Time: 3:26 PM
7
 */
8
9
namespace Carno\NSQ\Types;
10
11
use Carno\NSQ\Chips\TMCommands;
12
use Carno\NSQ\Chips\TMExtras;
13
14
class Message
15
{
16
    use TMExtras, TMCommands;
17
18
    /**
19
     * @var string
20
     */
21
    private $payload = null;
22
23
    /**
24
     * Message constructor.
25
     * @param string $payload
26
     */
27
    public function __construct(string $payload)
28
    {
29
        $this->payload = $payload;
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function payload() : string
36
    {
37
        return $this->payload;
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function __toString() : string
44
    {
45
        return $this->payload;
46
    }
47
}
48