Completed
Push — master ( 5cc7cd...19c82c )
by Jérémy
13s queued 12s
created

TimeEntriesDurationRequest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 10
c 1
b 0
f 0
dl 0
loc 26
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 5 1
A start() 0 3 1
A end() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace JDecool\Clockify\Api\TimeEntry;
6
7
class TimeEntriesDurationRequest
8
{
9
    private $start;
10
    private $end;
11
12
    public function __construct(string $start, string $end)
13
    {
14
        $this->start = $start;
15
        $this->end = $end;
16
    }
17
18
    public function start(): string
19
    {
20
        return $this->start;
21
    }
22
23
    public function end(): string
24
    {
25
        return $this->end;
26
    }
27
28
    public function toArray(): array
29
    {
30
        return [
31
            'start' => $this->start,
32
            'end' => $this->end,
33
        ];
34
    }
35
}
36