Skip to content

Commit

Permalink
[PATCH] Fix setting null value
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Nov 2, 2019
1 parent dfb06b4 commit 6a9edc1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Model/BatchTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ public function toString(): string

public function getDay(): int
{
return $this->day ?: 0;
return $this->day;
}

public function setDay(int $day): void
public function setDay(?int $day): void
{
$this->day = $day;
$this->day = $day ?: 0;
}

public function getTime(): ?DateTime
{
return $this->time;
}

public function setTime(DateTime $time): void
public function setTime(?DateTime $time): void
{
$this->time = $time;
}
Expand Down

0 comments on commit 6a9edc1

Please sign in to comment.