Passed
Push — master ( 8634b9...ba407f )
by Chris
14:07
created

SetLabel   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 27
ccs 0
cts 16
cp 0
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getLabel() 0 4 1
A getTypeId() 0 4 1
A getWireSize() 0 4 1
1
<?php declare(strict_types=1);
2
3
namespace DaveRandom\LibLifxLan\Messages\Device\Commands;
4
5
use DaveRandom\LibLifxLan\DataTypes\Label;
6
use DaveRandom\LibLifxLan\Messages\Message;
7
8
final class SetLabel implements Message
9
{
10
    public const MESSAGE_TYPE_ID = 24;
11
    public const WIRE_SIZE = 32;
12
13
    private $label;
14
15
    public function __construct(Label $label)
16
    {
17
        $this->label = $label;
18
    }
19
20
    public function getLabel(): Label
21
    {
22
        return $this->label;
23
    }
24
25
    public function getTypeId(): int
26
    {
27
        return self::MESSAGE_TYPE_ID;
28
    }
29
30
    public function getWireSize(): int
31
    {
32
        return self::WIRE_SIZE;
33
    }
34
}
35