Permalink
Browse files

elseif

  • Loading branch information...
1 parent de5e262 commit 26de33fa41a2fed3e8bd334686f7a545826cb036 @tvlooy tvlooy committed Jun 24, 2013
Showing with 5 additions and 5 deletions.
  1. +1 −1 src/Cron/AbstractField.php
  2. +2 −2 src/Cron/CronExpression.php
  3. +1 −1 src/Cron/DayOfWeekField.php
  4. +1 −1 tests/Cron/CronExpressionTest.php
@@ -22,7 +22,7 @@ public function isSatisfied($dateValue, $value)
{
if ($this->isIncrementsOfRanges($value)) {
return $this->isInIncrementsOfRanges($dateValue, $value);
- } else if ($this->isRange($value)) {
+ } elseif ($this->isRange($value)) {
return $this->isInRange($dateValue, $value);
}
@@ -208,7 +208,7 @@ public function getExpression($part = null)
{
if (null === $part) {
return implode(' ', $this->cronParts);
- } else if (array_key_exists($part, $this->cronParts)) {
+ } elseif (array_key_exists($part, $this->cronParts)) {
return $this->cronParts[$part];
}
@@ -239,7 +239,7 @@ public function isDue($currentTime = null)
if (null === $currentTime || 'now' === $currentTime) {
$currentDate = date('Y-m-d H:i');
$currentTime = strtotime($currentDate);
- } else if ($currentTime instanceof DateTime) {
+ } elseif ($currentTime instanceof DateTime) {
$currentDate = $currentTime->format('Y-m-d H:i');
$currentTime = strtotime($currentDate);
} else {
@@ -90,7 +90,7 @@ public function isSatisfiedBy(DateTime $date, $value)
$parts = explode('-', $value);
if ($parts[0] == '7') {
$parts[0] = '0';
- } else if ($parts[1] == '0') {
+ } elseif ($parts[1] == '0') {
$parts[1] = '7';
}
$value = implode('-', $parts);
@@ -195,7 +195,7 @@ public function testDeterminesIfCronIsDue($schedule, $relativeTime, $nextRun, $i
$cron = CronExpression::factory($schedule);
if (is_string($relativeTime)) {
$relativeTime = new DateTime($relativeTime);
- } else if (is_int($relativeTime)) {
+ } elseif (is_int($relativeTime)) {
$relativeTime = date('Y-m-d H:i:s', $relativeTime);
}
$this->assertEquals($isDue, $cron->isDue($relativeTime));

0 comments on commit 26de33f

Please sign in to comment.