ExplainCommand #124
Annotations
10 warnings
Infection PHP:
src/Command/ListCommand.php#L55
Escaped Mutant for Mutator "Coalesce":
--- Original
+++ New
@@ @@
parent::__construct();
$this->scheduler = $scheduler;
$this->clock = $clock ?? new SystemClock();
- $this->explainer = $explainer ?? new DefaultCronExpressionExplainer();
+ $this->explainer = new DefaultCronExpressionExplainer() ?? $explainer;
}
public static function getDefaultName() : string
{
|
Infection PHP:
src/Command/ListCommand.php#L233
Escaped Mutant for Mutator "Break_":
--- Original
+++ New
@@ @@
$count = 0;
foreach ($jobSchedules as $key => $value) {
if ($count >= $next) {
- break;
+ continue;
}
$slicedJobs[$key] = $value;
$count++;
|
Infection PHP:
src/Command/ListCommand.php#L274
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
if ($repeatAfterSeconds === 0) {
return $nextDueDate;
}
- $previousDueDate = DateTimeImmutable::createFromMutable($expression->getPreviousRunDate($now, 0, true)->setTimezone($timeZone));
+ $previousDueDate = DateTimeImmutable::createFromMutable($expression->getPreviousRunDate($now, -1, true)->setTimezone($timeZone));
if (!$this->wasPreviousDueDateInCurrentMinute($now, $previousDueDate)) {
return $nextDueDate;
}
|
Infection PHP:
src/Command/ListCommand.php#L281
Escaped Mutant for Mutator "CastInt":
--- Original
+++ New
@@ @@
if (!$this->wasPreviousDueDateInCurrentMinute($now, $previousDueDate)) {
return $nextDueDate;
}
- $currentSecond = (int) $now->format('s');
+ $currentSecond = $now->format('s');
$runTimes = (int) floor($currentSecond / $repeatAfterSeconds);
$nextRunSecond = ($runTimes + 1) * $repeatAfterSeconds;
// Don't abuse seconds overlap
|
Infection PHP:
src/Command/ListCommand.php#L282
Escaped Mutant for Mutator "Division":
--- Original
+++ New
@@ @@
return $nextDueDate;
}
$currentSecond = (int) $now->format('s');
- $runTimes = (int) floor($currentSecond / $repeatAfterSeconds);
+ $runTimes = (int) floor($currentSecond * $repeatAfterSeconds);
$nextRunSecond = ($runTimes + 1) * $repeatAfterSeconds;
// Don't abuse seconds overlap
if ($nextRunSecond > 59) {
|
Infection PHP:
src/Command/ListCommand.php#L282
Escaped Mutant for Mutator "RoundingFamily":
--- Original
+++ New
@@ @@
return $nextDueDate;
}
$currentSecond = (int) $now->format('s');
- $runTimes = (int) floor($currentSecond / $repeatAfterSeconds);
+ $runTimes = (int) ceil($currentSecond / $repeatAfterSeconds);
$nextRunSecond = ($runTimes + 1) * $repeatAfterSeconds;
// Don't abuse seconds overlap
if ($nextRunSecond > 59) {
|
Infection PHP:
src/Command/ListCommand.php#L282
Escaped Mutant for Mutator "RoundingFamily":
--- Original
+++ New
@@ @@
return $nextDueDate;
}
$currentSecond = (int) $now->format('s');
- $runTimes = (int) floor($currentSecond / $repeatAfterSeconds);
+ $runTimes = (int) round($currentSecond / $repeatAfterSeconds);
$nextRunSecond = ($runTimes + 1) * $repeatAfterSeconds;
// Don't abuse seconds overlap
if ($nextRunSecond > 59) {
|
Infection PHP:
src/Command/ListCommand.php#L283
Escaped Mutant for Mutator "Multiplication":
--- Original
+++ New
@@ @@
}
$currentSecond = (int) $now->format('s');
$runTimes = (int) floor($currentSecond / $repeatAfterSeconds);
- $nextRunSecond = ($runTimes + 1) * $repeatAfterSeconds;
+ $nextRunSecond = ($runTimes + 1) / $repeatAfterSeconds;
// Don't abuse seconds overlap
if ($nextRunSecond > 59) {
return $nextDueDate;
|
Infection PHP:
src/Command/ListCommand.php#L286
Escaped Mutant for Mutator "GreaterThan":
--- Original
+++ New
@@ @@
$runTimes = (int) floor($currentSecond / $repeatAfterSeconds);
$nextRunSecond = ($runTimes + 1) * $repeatAfterSeconds;
// Don't abuse seconds overlap
- if ($nextRunSecond > 59) {
+ if ($nextRunSecond >= 59) {
return $nextDueDate;
}
return $now->setTime((int) $now->format('H'), (int) $now->format('i'), $nextRunSecond);
|
Infection PHP:
src/Command/RunJobCommand.php#L68
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
$params = $input->getOption('parameters');
ob_start(static fn() => null);
try {
- $summary = $this->scheduler->runJob($input->getArgument('id'), !$input->getOption('no-force'), $params === null ? null : RunParameters::fromArray(json_decode($params, true, 512, JSON_THROW_ON_ERROR)));
+ $summary = $this->scheduler->runJob($input->getArgument('id'), !$input->getOption('no-force'), $params === null ? null : RunParameters::fromArray(json_decode($params, true, 511, JSON_THROW_ON_ERROR)));
$stdout = ($tmp = ob_get_clean()) === false ? '' : $tmp;
} catch (Throwable $e) {
ob_end_clean();
|
Loading