Skip to content

Commit

Permalink
unused vars removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuno committed Nov 17, 2016
1 parent 204c6e7 commit baaa148
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Scheduler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit baaa148

Please sign in to comment.