SymfonyCommandJob -> SymfonyConsoleJob #160
Annotations
11 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 = '';
$locales = $this->explainer->getSupportedLocales();
$last = array_key_last($locales);
- foreach ($locales 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
@@ @@
$locales = $this->explainer->getSupportedLocales();
$last = array_key_last($locales);
foreach ($locales 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($locales);
foreach ($locales as $code => $name) {
$string .= "{$code} ({$name})";
- if ($code !== $last) {
+ if ($code === $last) {
$string .= ', ';
}
}
|
Infection PHP:
src/Command/BaseExplainCommand.php#L39
Escaped Mutant for Mutator "Assignment":
--- Original
+++ New
@@ @@
foreach ($locales as $code => $name) {
$string .= "{$code} ({$name})";
if ($code !== $last) {
- $string .= ', ';
+ $string = ', ';
}
}
return $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, 'locale' => $locale];
}
|
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, 'locale' => $locale];
}
|
Infection PHP:
src/Command/ListCommand.php#L93
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
$output->writeln('<info>No scheduled jobs have been defined.</info>');
return self::SUCCESS;
}
- $maxExpressionLength = 0;
+ $maxExpressionLength = -1;
$data = [];
foreach ($jobSchedules as $id => $jobSchedule) {
$expressionString = (string) $jobSchedule->getExpression();
|
Infection PHP:
src/Command/ListCommand.php#L96
Escaped Mutant for Mutator "CastString":
--- Original
+++ New
@@ @@
$maxExpressionLength = 0;
$data = [];
foreach ($jobSchedules as $id => $jobSchedule) {
- $expressionString = (string) $jobSchedule->getExpression();
+ $expressionString = $jobSchedule->getExpression();
$seconds = $jobSchedule->getRepeatAfterSeconds();
$secondsString = $seconds !== 0 ? " / {$seconds}" : '';
$computedTimeZone = $this->computeTimeZone($jobSchedule, $timeZone);
|
Infection PHP:
src/Command/ListCommand.php#L104
Escaped Mutant for Mutator "Concat":
--- Original
+++ New
@@ @@
$secondsString = $seconds !== 0 ? " / {$seconds}" : '';
$computedTimeZone = $this->computeTimeZone($jobSchedule, $timeZone);
$timeZoneString = $computedTimeZone !== null ? " ({$computedTimeZone->getName()})" : '';
- $expressionLength = mb_strlen($expressionString . $secondsString . $timeZoneString);
+ $expressionLength = mb_strlen($secondsString . $expressionString . $timeZoneString);
$data[$id] = [$expressionString, $secondsString, $timeZoneString, $expressionLength, $computedTimeZone];
if ($expressionLength > $maxExpressionLength) {
$maxExpressionLength = $expressionLength;
|
The following artifacts were uploaded using a version of actions/upload-artifact that is scheduled for deprecation: "Logs - Mutations".
Please update your workflow to use v4 of the artifact actions.
Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
|
Loading