Completed
Push — master ( 99440d...816aa4 )
by Chris
03:23 queued 10s
created

Header::setFrame()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace DaveRandom\LibLifxLan\Header;
4
5
final class Header
6
{
7
    public const WIRE_SIZE = Frame::WIRE_SIZE + FrameAddress::WIRE_SIZE + ProtocolHeader::WIRE_SIZE;
8
9
    private $frame;
10
    private $frameAddress;
11
    private $protocolHeader;
12
13 23
    public function __construct(Frame $frame, FrameAddress $frameAddress, ProtocolHeader $protocolHeader)
14
    {
15 23
        $this->frame = $frame;
16 23
        $this->frameAddress = $frameAddress;
17 23
        $this->protocolHeader = $protocolHeader;
18
    }
19
20 16
    public function getFrame(): Frame
21
    {
22 16
        return $this->frame;
23
    }
24
25 13
    public function getFrameAddress(): FrameAddress
26
    {
27 13
        return $this->frameAddress;
28
    }
29
30 10
    public function getProtocolHeader(): ProtocolHeader
31
    {
32 10
        return $this->protocolHeader;
33
    }
34
}
35