Total Complexity | 9 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | class BatchTime |
||
15 | { |
||
16 | /** |
||
17 | * @var int |
||
18 | */ |
||
19 | private $day = 0; |
||
20 | |||
21 | /** |
||
22 | * @var \DateTime|null |
||
23 | * */ |
||
24 | private $time; |
||
25 | |||
26 | public function __toString() |
||
27 | { |
||
28 | return 'Day: '.$this->day.', Time: '.($this->time ? $this->time->format('H:i:s') : ''); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @return int |
||
33 | */ |
||
34 | public function getDay(): int |
||
35 | { |
||
36 | return $this->day ?: 0; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param int $day |
||
41 | */ |
||
42 | public function setDay(int $day): void |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @return \DateTime|null |
||
49 | */ |
||
50 | public function getTime(): ?\DateTime |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @param \DateTime $time |
||
57 | */ |
||
58 | public function setTime(\DateTime $time): void |
||
61 | } |
||
62 | |||
63 | /** |
||
64 | * @return int |
||
65 | */ |
||
66 | public function getSeconds(): int |
||
69 | } |
||
70 | } |
||
71 |