UnknownMessage   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 24
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getTypeId() 0 3 1
A getData() 0 3 1
A getWireSize() 0 3 1
A __construct() 0 4 1
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 5
    public function __construct(int $typeId, string $data)
11
    {
12 5
        $this->typeId = $typeId;
13 5
        $this->data = $data;
14
    }
15
16 3
    public function getData(): string
17
    {
18 3
        return $this->data;
19
    }
20
21 1
    public function getTypeId(): int
22
    {
23 1
        return $this->typeId;
24
    }
25
26 1
    public function getWireSize(): int
27
    {
28 1
        return \strlen($this->data);
29
    }
30
}
31