treewide: strict comparisons
This commit is contained in:
@@ -8,11 +8,11 @@ use pvv\side\Activity;
|
||||
|
||||
class AnimekveldActivity implements Activity {
|
||||
public function nextDate(\DateTimeImmutable $date) {
|
||||
if ($date->format('H') > 20 || $date->format('H') == 19 && $date->format('i') > 30) {
|
||||
if (intval($date->format('H')) > 20 || intval($date->format('H')) === 19 && intval($date->format('i')) > 30) {
|
||||
return $this->nextDate($date->add(new \DateInterval('P1D'))->setTime(19, 30, 0));
|
||||
}
|
||||
$date = $date->setTime(19, 30, 0);
|
||||
if ($date->format('N') != 5) {
|
||||
if (intval($date->format('N')) !== 5) {
|
||||
return $this->nextDate($date->add(new \DateInterval('P1D')));
|
||||
}
|
||||
|
||||
@@ -20,11 +20,11 @@ class AnimekveldActivity implements Activity {
|
||||
}
|
||||
|
||||
public function prevDate(\DateTimeImmutable $date) {
|
||||
if ($date->format('H') < 19 || $date->format('H') == 20 && $date->format('i') < 30) {
|
||||
if (intval($date->format('H')) < 19 || intval($date->format('H')) === 20 && intval($date->format('i')) < 30) {
|
||||
return $this->prevDate($date->sub(new \DateInterval('P1D'))->setTime(19, 30, 0));
|
||||
}
|
||||
$date = $date->setTime(19, 30, 0);
|
||||
if ($date->format('N') != 5) {
|
||||
if (intval($date->format('N')) !== 5) {
|
||||
return $this->prevDate($date->sub(new \DateInterval('P1D')));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user