Fix docs (#178) #754
Annotations
10 warnings
mutation / PHP 8.2-ubuntu-latest:
src/Command/InfoCommand.php#L163
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$io->write($prefix . ' - ' . (Options::isVariable($item) ? '<fg=green>' . $item . '</>' : $item));
}
}
- $io->newLine();
+
}
}
|
mutation / PHP 8.2-ubuntu-latest:
src/Command/RebuildCommand.php#L29
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
protected function execute(InputInterface $input, OutputInterface $output) : int
{
new MergePlanProcess($this->requireComposer());
- return 0;
+ return -1;
}
}
|
mutation / PHP 8.2-ubuntu-latest:
src/Command/RebuildCommand.php#L29
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
protected function execute(InputInterface $input, OutputInterface $output) : int
{
new MergePlanProcess($this->requireComposer());
- return 0;
+ return 1;
}
}
|
mutation / PHP 8.2-ubuntu-latest:
src/Composer/MergePlanProcess.php#L80
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
if (Options::containsWildcard($file)) {
$matches = glob($absoluteFilePath);
if (empty($matches)) {
- continue;
+ break;
}
foreach ($matches as $match) {
$this->mergePlan->add($this->normalizePackageFilePath($package, $match, $isVendorOverrideLayer), $packageName, $group);
|
mutation / PHP 8.2-ubuntu-latest:
src/Composer/MergePlanProcess.php#L95
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
continue;
}
if ($isOptional && !is_file($absoluteFilePath)) {
- continue;
+ break;
}
$this->mergePlan->add($this->normalizePackageFilePath($package, $absoluteFilePath, $isVendorOverrideLayer), $packageName, $group);
}
|
mutation / PHP 8.2-ubuntu-latest:
src/Composer/MergePlanProcess.php#L123
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
{
foreach ($this->helper->getEnvironmentConfig() as $environment => $groups) {
if ($environment === Options::DEFAULT_ENVIRONMENT) {
- continue;
+ break;
}
if (empty($groups)) {
$this->mergePlan->addEnvironmentWithoutConfigs($environment);
|
mutation / PHP 8.2-ubuntu-latest:
src/Composer/Options.php#L49
Escaped Mutant for Mutator "CastString":
--- Original
+++ New
@@ @@
}
$options = $extra['config-plugin-options'];
if (!empty($options['merge-plan-file'])) {
- $this->mergePlanFile = (string) $options['merge-plan-file'];
+ $this->mergePlanFile = $options['merge-plan-file'];
}
if (isset($options['build-merge-plan'])) {
$this->buildMergePlan = (bool) $options['build-merge-plan'];
|
mutation / PHP 8.2-ubuntu-latest:
src/Merger.php#L231
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
private function setValue(Context $context, array $keyPath, array &$array, string $key, mixed $value) : bool
{
if ($this->dataModifiers->shouldRemoveKeyFromVendor($context, $keyPath)) {
- return false;
+ return true;
}
/** @var mixed */
$array[$key] = $value;
|
mutation / PHP 8.2-ubuntu-latest:
src/Merger.php#L262
Escaped Mutant for Mutator "Spaceship":
--- Original
+++ New
@@ @@
usort($filePaths, static function (string $a, string $b) {
$countDirsA = substr_count($a, '/');
$countDirsB = substr_count($b, '/');
- return $countDirsA === $countDirsB ? $a <=> $b : $countDirsA <=> $countDirsB;
+ return $countDirsA === $countDirsB ? $a <=> $b : $countDirsB <=> $countDirsA;
});
$message = sprintf("Duplicate key \"%s\" in the following configs while building \"%s\" group:\n%s", implode(' => ', $recursiveKeyPath), $currentGroupName, implode("\n", $filePaths));
throw new ErrorException($message, 0, E_USER_ERROR);
}
}
|
mutation / PHP 8.2-ubuntu-latest:
src/Merger.php#L272
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
return $countDirsA === $countDirsB ? $a <=> $b : $countDirsA <=> $countDirsB;
});
$message = sprintf("Duplicate key \"%s\" in the following configs while building \"%s\" group:\n%s", implode(' => ', $recursiveKeyPath), $currentGroupName, implode("\n", $filePaths));
- throw new ErrorException($message, 0, E_USER_ERROR);
+ throw new ErrorException($message, -1, E_USER_ERROR);
}
}
|