Round::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 4
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace JDecool\Clockify\Model;
6
7
class Round
8
{
9
    private $minutes;
10
    private $round;
11
12
    public static function fromArray(array $data): self
13
    {
14
        return new self(
15
            $data['minutes'],
16
            $data['round']
17
        );
18
    }
19
20
    public function __construct(string $minutes, string $round)
21
    {
22
        $this->minutes = $minutes;
23
        $this->round = $round;
24
    }
25
26
    public function minutes(): string
27
    {
28
        return $this->minutes;
29
    }
30
31
    public function round(): string
32
    {
33
        return $this->round;
34
    }
35
}
36