Passed
Push — master ( c0886a...23eada )
by Chris
03:14
created

UnknownMessage::getTypeId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace DaveRandom\LibLifxLan\Messages;
4
5
final class UnknownMessage implements Message
6
{
7
    private $typeId;
8
    private $data;
9
10
    public function __construct(int $typeId, string $data)
11
    {
12
        $this->typeId = $typeId;
13
        $this->data = $data;
14
    }
15
16
    public function getData(): string
17
    {
18
        return $this->data;
19
    }
20
21
    public function getTypeId(): int
22
    {
23
        return $this->typeId;
24
    }
25
26
    public function getWireSize(): int
27
    {
28
        return \strlen($this->data);
29
    }
30
}
31