Skip to content

Commit

Permalink
Merge pull request #36 from semalead/fix/useless-default-argument
Browse files Browse the repository at this point in the history
Set $currentTime as 'now'
  • Loading branch information
mtdowling committed Nov 25, 2013
2 parents 23487c9 + 1bc124c commit 88df9c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Cron/CronExpression.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ public function __toString()
*
* @return bool Returns TRUE if the cron is due to run or FALSE if not
*/
public function isDue($currentTime = null)
public function isDue($currentTime = 'now')
{
if (null === $currentTime || 'now' === $currentTime) {
if ('now' === $currentTime) {
$currentDate = date('Y-m-d H:i');
$currentTime = strtotime($currentDate);
} elseif ($currentTime instanceof DateTime) {
Expand Down

0 comments on commit 88df9c7

Please sign in to comment.