CI #146
Annotations
10 warnings
Infection PHP:
src/Command/BaseExplainCommand.php#L26
Escaped Mutant for Mutator "Coalesce":
--- Original
+++ New
@@ @@
protected ClockInterface $clock;
public function __construct(?CronExpressionExplainer $explainer, ?ClockInterface $clock)
{
- $this->explainer = $explainer ?? new DefaultCronExpressionExplainer();
+ $this->explainer = new DefaultCronExpressionExplainer() ?? $explainer;
$this->clock = $clock ?? new SystemClock();
parent::__construct();
}
|
Infection PHP:
src/Command/BaseExplainCommand.php#L36
Escaped Mutant for Mutator "Foreach_":
--- Original
+++ New
@@ @@
$string = '';
$languages = $this->explainer->getSupportedLanguages();
$last = array_key_last($languages);
- foreach ($languages as $code => $name) {
+ foreach (array() as $code => $name) {
$string .= "{$code} ({$name})";
if ($code !== $last) {
$string .= ', ';
|
Infection PHP:
src/Command/BaseExplainCommand.php#L37
Escaped Mutant for Mutator "Assignment":
--- Original
+++ New
@@ @@
$languages = $this->explainer->getSupportedLanguages();
$last = array_key_last($languages);
foreach ($languages as $code => $name) {
- $string .= "{$code} ({$name})";
+ $string = "{$code} ({$name})";
if ($code !== $last) {
$string .= ', ';
}
|
Infection PHP:
src/Command/BaseExplainCommand.php#L38
Escaped Mutant for Mutator "NotIdentical":
--- Original
+++ New
@@ @@
$last = array_key_last($languages);
foreach ($languages as $code => $name) {
$string .= "{$code} ({$name})";
- if ($code !== $last) {
+ if ($code === $last) {
$string .= ', ';
}
}
|
Infection PHP:
src/Command/ExplainCommand.php#L160
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
return null;
}
// Happens only when $hasErrors = true
- assert(!is_string($seconds) && $seconds >= 0 && $seconds <= 59);
+ assert((!is_string($seconds) || $seconds >= 0) && $seconds <= 59);
assert(!is_string($timezone));
return ['id' => $id, 'expression' => $expression, 'seconds' => $seconds, 'timezone' => $timezone, 'language' => $language];
}
|
Infection PHP:
src/Command/ExplainCommand.php#L160
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
return null;
}
// Happens only when $hasErrors = true
- assert(!is_string($seconds) && $seconds >= 0 && $seconds <= 59);
+ assert(!is_string($seconds) && $seconds >= 0 || $seconds <= 59);
assert(!is_string($timezone));
return ['id' => $id, 'expression' => $expression, 'seconds' => $seconds, 'timezone' => $timezone, 'language' => $language];
}
|
Infection PHP:
src/Command/ListCommand.php#L211
Escaped Mutant for Mutator "GreaterThanOrEqualTo":
--- Original
+++ New
@@ @@
return null;
}
// Happens only when $hasErrors = true
- assert(is_bool($next) || is_int($next) && $next >= 1);
+ assert(is_bool($next) || is_int($next) && $next > 1);
assert(!is_string($timezone));
return ['next' => $next, 'timezone' => $timezone, 'explain' => $explain];
}
|
Infection PHP:
src/Command/ListCommand.php#L211
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
return null;
}
// Happens only when $hasErrors = true
- assert(is_bool($next) || is_int($next) && $next >= 1);
+ assert(is_bool($next) || (is_int($next) || $next >= 1));
assert(!is_string($timezone));
return ['next' => $next, 'timezone' => $timezone, 'explain' => $explain];
}
|
Infection PHP:
src/Command/ListCommand.php#L251
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#L292
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;
}
|
The logs for this run have expired and are no longer available.
Loading