| Total Complexity | 10 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class BatchTime |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var int |
||
| 20 | */ |
||
| 21 | private $day = 0; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var DateTime|null |
||
| 25 | */ |
||
| 26 | private $time; |
||
| 27 | |||
| 28 | public function __toString() |
||
| 31 | } |
||
| 32 | |||
| 33 | public function toString(): string |
||
| 34 | { |
||
| 35 | return 'Day: '.$this->day.', Time: '.(null !== $this->time ? $this->time->format('H:i:s') : 'null'); |
||
| 36 | } |
||
| 37 | |||
| 38 | public function getDay(): int |
||
| 39 | { |
||
| 40 | return $this->day; |
||
| 41 | } |
||
| 42 | |||
| 43 | public function setDay(?int $day): void |
||
| 44 | { |
||
| 45 | $this->day = $day ?: 0; |
||
| 46 | } |
||
| 47 | |||
| 48 | public function getTime(): ?DateTime |
||
| 51 | } |
||
| 52 | |||
| 53 | public function setTime(?DateTime $time): void |
||
| 56 | } |
||
| 57 | |||
| 58 | public function getSeconds(): int |
||
| 68 | } |
||
| 69 | } |
||
| 70 |