ProcessJobExecutor: log unexpected stderr instead of throwing an exce… #140
Annotations
10 warnings
Infection PHP:
src/Command/ExplainCommand.php#L35
Escaped Mutant for Mutator "Coalesce":
--- Original
+++ New
@@ @@
{
parent::__construct($clock);
$this->scheduler = $scheduler;
- $this->explainer = $explainer ?? new DefaultCronExpressionExplainer();
+ $this->explainer = new DefaultCronExpressionExplainer() ?? $explainer;
}
public static function getDefaultName() : string
{
|
Infection PHP:
src/Command/ExplainCommand.php#L113
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
$output->writeln("<error>Option --seconds expects an int<0, 59>, '{$seconds}' given.</error>");
}
if ($id !== null) {
- $hasErrors = true;
+ $hasErrors = false;
$output->writeln('<error>Option --seconds cannot be used with --id.</error>');
}
if ($expression === null) {
|
Infection PHP:
src/Command/ExplainCommand.php#L134
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
$timezone = new DateTimeZone($timezone);
}
if ($id !== null) {
- $hasErrors = true;
+ $hasErrors = false;
$output->writeln('<error>Option --timezone cannot be used with --id.</error>');
}
if ($expression === null) {
|
Infection PHP:
src/Command/ExplainCommand.php#L149
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];
}
|
Infection PHP:
src/Command/ExplainCommand.php#L149
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];
}
|
Infection PHP:
src/Command/ListCommand.php#L52
Escaped Mutant for Mutator "Coalesce":
--- Original
+++ New
@@ @@
{
parent::__construct($clock);
$this->scheduler = $scheduler;
- $this->explainer = $explainer ?? new DefaultCronExpressionExplainer();
+ $this->explainer = new DefaultCronExpressionExplainer() ?? $explainer;
}
public static function getDefaultName() : string
{
|
Infection PHP:
src/Command/ListCommand.php#L195
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#L195
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#L235
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#L276
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;
}
|
Loading