Skip to content

chore: rector for PHP 8.1 #222

chore: rector for PHP 8.1

chore: rector for PHP 8.1 #222

Triggered via pull request March 27, 2025 09:02
Status Success
Total duration 40s
Artifacts

infection.yml

on: pull_request
infection  /  Mutation Testing
34s
infection / Mutation Testing
Fit to window
Zoom out
Zoom in

Annotations

8 warnings
infection / Mutation Testing: src/TaskRunner.php#L55
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation": @@ @@ } foreach ($tasks as $task) { // If specific tasks were chosen then skip executing remaining tasks - if ($this->only !== [] && !in_array($task->name, $this->only, true)) { + if (!($this->only !== []) && in_array($task->name, $this->only, true)) { continue; } if (!$task->shouldRun($this->testTime) && $this->only === []) {
infection / Mutation Testing: src/TaskRunner.php#L55
Escaped Mutant for Mutator "LogicalNot": @@ @@ } foreach ($tasks as $task) { // If specific tasks were chosen then skip executing remaining tasks - if ($this->only !== [] && !in_array($task->name, $this->only, true)) { + if ($this->only !== [] && in_array($task->name, $this->only, true)) { continue; } if (!$task->shouldRun($this->testTime) && $this->only === []) {
infection / Mutation Testing: src/Task.php#L193
Escaped Mutant for Mutator "ProtectedVisibility": @@ @@ /** * Checks if it runs within the specified environment. */ - protected function runsInEnvironment(string $environment): bool + private function runsInEnvironment(string $environment): bool { // If nothing is specified then it should run if ($this->environments === []) {
infection / Mutation Testing: src/Task.php#L139
Escaped Mutant for Mutator "LogicalAnd": @@ @@ { $cron = service('cronExpression'); // Allow times to be set during testing - if ($testTime !== null && $testTime !== '' && $testTime !== '0') { + if ($testTime !== null && $testTime !== '' || $testTime !== '0') { $cron->testTime($testTime); } // Are we restricting to environments?
infection / Mutation Testing: src/Task.php#L139
Escaped Mutant for Mutator "LogicalAnd": @@ @@ { $cron = service('cronExpression'); // Allow times to be set during testing - if ($testTime !== null && $testTime !== '' && $testTime !== '0') { + if (($testTime !== null || $testTime !== '') && $testTime !== '0') { $cron->testTime($testTime); } // Are we restricting to environments?
infection / Mutation Testing: src/RunResolver.php#L124
Escaped Mutant for Mutator "MatchArmRemoval": @@ @@ 'hour' => $next->addHours(1), 'monthDay', 'weekDay' => $next->addDays(1), 'month' => $next->addMonths(1), - default => $next, }; } /**
infection / Mutation Testing: src/RunResolver.php#L122
Escaped Mutant for Mutator "ProtectedVisibility": @@ @@ * definitely make it smarter in the future to cut down on the * amount of iterations needed. */ - protected function increment(Time $next, string $position): Time + private function increment(Time $next, string $position): Time { return match ($position) { 'minute' => $next->addMinutes(1),
infection / Mutation Testing: src/FrequenciesTrait.php#L485
Escaped Mutant for Mutator "ProtectedVisibility": @@ @@ * * @return $this */ - protected function setDayOfWeek(int $day, ?string $time = null) + private function setDayOfWeek(int $day, ?string $time = null) { $min = $hour = '*'; if ($time !== null && $time !== '' && $time !== '0') {