Expand references #693
Annotations
10 warnings
mutation / PHP 8.2-ubuntu-latest:
src/Command/CopyCommand.php#L58
Escaped Mutant for Mutator "UnwrapTrim":
--- Original
+++ New
@@ @@
*/
$builder = new PackageFilesProcess($this->getComposer(), [$package]);
$filesystem = new Filesystem();
- $targetPath = $builder->paths()->absolute(trim($target, '\\/'));
+ $targetPath = $builder->paths()->absolute($target);
$filesystem->ensureDirectoryExists($targetPath);
$prefix = str_replace('/', '-', $package);
foreach ($this->prepareFiles($builder->files(), $selectedFileNames) as $file) {
|
mutation / PHP 8.2-ubuntu-latest:
src/Command/CopyCommand.php#L67
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
$filename = str_replace('/', '-', $file->filename());
$filesystem->copy($file->absolutePath(), "{$targetPath}/{$prefix}-{$filename}");
}
- return 0;
+ return 1;
}
/**
* @param PackageFile[] $packageFiles
|
mutation / PHP 8.2-ubuntu-latest:
src/Command/CopyCommand.php#L67
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
$filename = str_replace('/', '-', $file->filename());
$filesystem->copy($file->absolutePath(), "{$targetPath}/{$prefix}-{$filename}");
}
- return 0;
+ return -1;
}
/**
* @param PackageFile[] $packageFiles
|
mutation / PHP 8.2-ubuntu-latest:
src/Command/RebuildCommand.php#L33
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
* @psalm-suppress DeprecatedMethod
*/
new MergePlanProcess($this->getComposer());
- return 0;
+ return -1;
}
}
|
mutation / PHP 8.2-ubuntu-latest:
src/Command/RebuildCommand.php#L33
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
* @psalm-suppress DeprecatedMethod
*/
new MergePlanProcess($this->getComposer());
- return 0;
+ return 1;
}
}
|
mutation / PHP 8.2-ubuntu-latest:
src/Composer/EventHandler.php#L59
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
}
public function onPostUpdateCommandDump(Event $event) : void
{
- $this->processConfigs($event->getComposer());
+
}
public function getCapabilities() : array
{
|
mutation / PHP 8.2-ubuntu-latest:
src/Composer/MergePlanCollector.php#L96
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
foreach ($packages as $files) {
foreach ($files as $file) {
if (is_array($file)) {
- $environments[$file[0]] = true;
+ $environments[$file[0]] = false;
}
}
}
|
mutation / PHP 8.2-ubuntu-latest:
src/Composer/MergePlanCollector.php#L148
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
foreach ($packages as $package => $items) {
$packages[$package] = array_values(array_filter($items, static fn($item) => $item !== $variable));
}
- uksort($packages, static fn(string $a, string $b) => (self::PACKAGES_ORDER[$a] ?? 0) <=> (self::PACKAGES_ORDER[$b] ?? 0));
+ uksort($packages, static fn(string $a, string $b) => (self::PACKAGES_ORDER[$a] ?? -1) <=> (self::PACKAGES_ORDER[$b] ?? 0));
}
foreach ($packages as $items) {
foreach ($items as $item) {
|
mutation / PHP 8.2-ubuntu-latest:
src/Composer/MergePlanProcess.php#L65
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
$isOptional = false;
if (Options::isOptional($file)) {
$isOptional = true;
- $file = substr($file, 1);
+ $file = substr($file, 0);
}
if (Options::isVariable($file)) {
$this->mergePlanCollector->add($file, $packageName, $group);
|
mutation / PHP 8.2-ubuntu-latest:
src/Composer/MergePlanProcess.php#L65
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
$isOptional = false;
if (Options::isOptional($file)) {
$isOptional = true;
- $file = substr($file, 1);
+ $file = substr($file, 2);
}
if (Options::isVariable($file)) {
$this->mergePlanCollector->add($file, $packageName, $group);
|