Skip to content

Apply fixes from StyleCI #371

Apply fixes from StyleCI

Apply fixes from StyleCI #371

Triggered via push June 22, 2024 12:59
Status Success
Total duration 40s
Artifacts

mutation.yml

on: push
Matrix: mutation / roave-infection
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
mutation / PHP 8.3-ubuntu-latest: src/RequirementsChecker.php#L105
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ if (!$requirement['condition']) { if ($requirement['mandatory']) { $requirement['error'] = true; - $requirement['warning'] = true; + $requirement['warning'] = false; $this->result['summary']['errors']++; } else { $requirement['error'] = false;
mutation / PHP 8.3-ubuntu-latest: src/RequirementsChecker.php#L185
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ if (empty($extensionVersion)) { return false; } - if (strncasecmp($extensionVersion, 'PECL-', 5) === 0) { + if (strncasecmp($extensionVersion, 'PECL-', 4) === 0) { $extensionVersion = substr($extensionVersion, 5); } /** @var bool */
mutation / PHP 8.3-ubuntu-latest: src/RequirementsChecker.php#L185
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ if (empty($extensionVersion)) { return false; } - if (strncasecmp($extensionVersion, 'PECL-', 5) === 0) { + if (strncasecmp($extensionVersion, 'PECL-', 6) === 0) { $extensionVersion = substr($extensionVersion, 5); } /** @var bool */
mutation / PHP 8.3-ubuntu-latest: src/RequirementsChecker.php#L185
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ if (empty($extensionVersion)) { return false; } - if (strncasecmp($extensionVersion, 'PECL-', 5) === 0) { + if (strncasecmp($extensionVersion, 'PECL-', 5) === -1) { $extensionVersion = substr($extensionVersion, 5); } /** @var bool */
mutation / PHP 8.3-ubuntu-latest: src/RequirementsChecker.php#L254
Escaped Mutant for Mutator "UnwrapTrim": --- Original +++ New @@ @@ return (int) $verboseSize; } $sizeUnit = trim($verboseSize, '0123456789'); - $size = trim(str_replace($sizeUnit, '', $verboseSize)); + $size = str_replace($sizeUnit, '', $verboseSize); if (!is_numeric($size)) { return 0; }
mutation / PHP 8.3-ubuntu-latest: src/RequirementsChecker.php#L339
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ * @param int|string $requirementKey Requirement key in the list. * @return array Normalized requirement. */ - public function normalizeRequirement(array $requirement, $requirementKey = 0) : array + public function normalizeRequirement(array $requirement, $requirementKey = -1) : array { if (!array_key_exists('condition', $requirement)) { $this->usageError("Requirement \"{$requirementKey}\" has no condition!");
mutation / PHP 8.3-ubuntu-latest: src/RequirementsChecker.php#L339
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ * @param int|string $requirementKey Requirement key in the list. * @return array Normalized requirement. */ - public function normalizeRequirement(array $requirement, $requirementKey = 0) : array + public function normalizeRequirement(array $requirement, $requirementKey = 1) : array { if (!array_key_exists('condition', $requirement)) { $this->usageError("Requirement \"{$requirementKey}\" has no condition!");
mutation / PHP 8.3-ubuntu-latest: src/RequirementsChecker.php#L339
Escaped Mutant for Mutator "PublicVisibility": --- Original +++ New @@ @@ * @param int|string $requirementKey Requirement key in the list. * @return array Normalized requirement. */ - public function normalizeRequirement(array $requirement, $requirementKey = 0) : array + protected function normalizeRequirement(array $requirement, $requirementKey = 0) : array { if (!array_key_exists('condition', $requirement)) { $this->usageError("Requirement \"{$requirementKey}\" has no condition!");
mutation / PHP 8.3-ubuntu-latest: src/RequirementsChecker.php#L360
Escaped Mutant for Mutator "LogicalNot": --- Original +++ New @@ @@ $requirement['mandatory'] = false; } } - if (!array_key_exists('by', $requirement)) { + if (array_key_exists('by', $requirement)) { $requirement['by'] = 'Unknown'; } if (!array_key_exists('memo', $requirement)) {
mutation / PHP 8.3-ubuntu-latest: src/RequirementsChecker.php#L363
Escaped Mutant for Mutator "LogicalNot": --- Original +++ New @@ @@ if (!array_key_exists('by', $requirement)) { $requirement['by'] = 'Unknown'; } - if (!array_key_exists('memo', $requirement)) { + if (array_key_exists('memo', $requirement)) { $requirement['memo'] = ''; } return $requirement;