Skip to content

Commit

Permalink
Merge pull request #172 from kenjis/fix-phpstan-error
Browse files Browse the repository at this point in the history
refactor: add assert() for PHPStan
  • Loading branch information
kenjis authored Jul 28, 2024
2 parents 31dcb0b + c83222d commit 0bc1137
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/CronExpression.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ private function checkTime(string $time, string $format): bool
}

$currentTime = $this->testTime->format($format);
assert(ctype_digit($currentTime));

// Handle repeating times (i.e. /5 or */5 for every 5 minutes)
if (strpos($time, '/') !== false) {
Expand Down

0 comments on commit 0bc1137

Please sign in to comment.