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

Group   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getGuid() 0 3 1
A getUpdatedAt() 0 3 1
A getLabel() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace DaveRandom\LibLifxLan\DataTypes;
4
5
use Ramsey\Uuid\UuidInterface;
6
use function DaveRandom\LibLifxLan\datetimeinterface_to_datetimeimmutable;
7
8
final class Group
9
{
10
    private $guid;
11
    private $label;
12
    private $updatedAt;
13
14
    /**
15
     * @param UuidInterface $guid
16
     * @param Label $label
17
     * @param \DateTimeInterface $updatedAt
18
     */
19 9
    public function __construct(UuidInterface $guid, Label $label, \DateTimeInterface $updatedAt)
20
    {
21 9
        $this->guid = $guid;
22 9
        $this->label = $label;
23 9
        $this->updatedAt = datetimeinterface_to_datetimeimmutable($updatedAt);
24
    }
25
26 1
    public function getGuid(): UuidInterface
27
    {
28 1
        return $this->guid;
29
    }
30
31 1
    public function getLabel(): Label
32
    {
33 1
        return $this->label;
34
    }
35
36 1
    public function getUpdatedAt(): \DateTimeImmutable
37
    {
38 1
        return $this->updatedAt;
39
    }
40
}
41