Skip to content

Commit

Permalink
Fix StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
shaedrich authored Dec 20, 2024
1 parent 4e113d4 commit a8fee27
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Console/Scheduling/ManagesFrequencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,11 @@ public function twiceDailyAt($first = 1, $second = 13, $offset = 0)
protected function hourBasedSchedule($minutes, $hours)
{
if (is_array($hours) || is_int($hours)) {
array_walk((array)$hours, $this->validateHour(...));
array_walk((array) $hours, $this->validateHour(...));
}

if (is_array($minutes) || is_int($minutes)) {
array_walk((array)$minutes, $this->validateMinute(...));
array_walk((array) $minutes, $this->validateMinute(...));
}

$minutes = is_array($minutes) ? implode(',', $minutes) : $minutes;
Expand Down
16 changes: 8 additions & 8 deletions src/Illuminate/Console/Scheduling/ValidatesFrequencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,42 @@
trait ValidatesFrequencies
{
/**
* @param int $hours
* @param int $hours
*/
protected function validateHour(int $hour)
{
if ($hour < 0 || $hour > HOURS_PER_DAY) {
throw new InvalidArgumentException("Hour cron expression component must be between 0 and " . HOURS_PER_DAY . ". [$hour] given");
throw new InvalidArgumentException("Hour cron expression component must be between 0 and ".HOURS_PER_DAY.". [$hour] given");
}
}

/**
* @param int $dayOfWeek
* @param int $dayOfWeek
*/
protected function validateDayOfWeek(int $dayOfWeek)
{
if ($dayOfWeek < 0 || $dayOfWeek > DAYS_PER_WEEK) {
throw new InvalidArgumentException("Day of week cron expression component must be between 0 and " . DAYS_PER_WEEK . ". [$dayOfWeek] given");
throw new InvalidArgumentException("Day of week cron expression component must be between 0 and ".DAYS_PER_WEEK.". [$dayOfWeek] given");
}
}

/**
* @param int $month
* @param int $month
*/
protected function validateMonth(int $month)
{
if ($month < 0 || $month > MONTHS_PER_YEAR) {
throw new InvalidArgumentException("Month cron expression component must be between 0 and " . MONTHS_PER_YEAR . ". [$month] given");
throw new InvalidArgumentException("Month cron expression component must be between 0 and ".MONTHS_PER_YEAR.". [$month] given");
}
}

/**
* @param int $month
* @param int $month
*/
protected function validateDayOfMonth(int $dayOfMonth)
{
if ($month < 0 || $month > MONTHS_PER_YEAR) {
throw new InvalidArgumentException("Month cron expression component must be between 0 and " . MONTHS_PER_YEAR . ". [$month] given");
throw new InvalidArgumentException("Month cron expression component must be between 0 and ".MONTHS_PER_YEAR.". [$month] given");
}
}
}

0 comments on commit a8fee27

Please sign in to comment.