From baaa148000cfbaf2600efb507b7a632a7cb25b31 Mon Sep 17 00:00:00 2001 From: Nuno Date: Thu, 17 Nov 2016 15:46:19 +0000 Subject: [PATCH] unused vars removed --- src/Scheduler.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Scheduler.php b/src/Scheduler.php index 6581e01..3661ac3 100644 --- a/src/Scheduler.php +++ b/src/Scheduler.php @@ -32,10 +32,10 @@ public static function instance() */ public function setTimeFrame( $startTime = null, $endTime = null ) { - if ($startTime != null && !empty($startTime)) { + if ($startTime !== null && !empty($startTime)) { $this->startTime = new \DateTime($startTime); } - if ($endTime != null && !empty($endTime)) { + if ($endTime !== null && !empty($endTime)) { $this->endTime = new \DateTime($endTime); } @@ -145,9 +145,6 @@ private function isInTimeFrame(\DateTime $date, $fromDateStr = 'now') return false; } - $dtStart = $this->startTime instanceof \DateTime ? $this->startTime->modify($date->format('Y-m-d')) : null; - $dtEnd = $this->endTime instanceof \DateTime ? $this->endTime->modify($date->format('Y-m-d')) : null; - if ($this->startTime && $date < $this->startTime->modify($date->format('Y-m-d'))) { return false; }