Skip to content

Add ability to specify recursion depth for recursive modifier (#155) #642

Add ability to specify recursion depth for recursive modifier (#155)

Add ability to specify recursion depth for recursive modifier (#155) #642

Triggered via push December 7, 2023 08:41
Status Success
Total duration 7m 52s
Artifacts

mutation.yml

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

Annotations

10 warnings
mutation / PHP 8.1-ubuntu-latest: src/Command/CopyCommand.php#L59
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $builder = new PackageFilesProcess($this->getComposer(), [$package]); $filesystem = new Filesystem(); $targetPath = $builder->paths()->absolute(trim($target, '\\/')); - $filesystem->ensureDirectoryExists($targetPath); + $prefix = str_replace('/', '-', $package); foreach ($this->prepareFiles($builder->files(), $selectedFileNames) as $file) { $filename = str_replace('/', '-', $file->filename());
mutation / PHP 8.1-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.1-ubuntu-latest: src/Composer/MergePlanProcess.php#L67
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->mergePlan->add($file, $packageName, $group);
mutation / PHP 8.1-ubuntu-latest: src/Composer/MergePlanProcess.php#L96
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.1-ubuntu-latest: src/Composer/MergePlanProcess.php#L124
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.1-ubuntu-latest: src/Composer/MergePlanProcess.php#L129
Escaped Mutant for Mutator "Continue_": --- Original +++ New @@ @@ } if (empty($groups)) { $this->mergePlan->addEnvironmentWithoutConfigs($environment); - continue; + break; } foreach ($groups as $group => $files) { $this->mergePlan->addMultiple((array) $files, Options::ROOT_PACKAGE_NAME, $group, $environment);
mutation / PHP 8.1-ubuntu-latest: src/Composer/MergePlanProcess.php#L155
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ $filePath = $this->helper->getPaths()->absolute($this->helper->getMergePlanFile()); (new Filesystem())->ensureDirectoryExists(dirname($filePath)); $oldContent = is_file($filePath) ? file_get_contents($filePath) : ''; - $content = '<?php' . "\n\ndeclare(strict_types=1);" . "\n\n// Do not edit. Content will be replaced." . "\nreturn " . VarDumper::create($mergePlan)->export(true) . ";\n"; + $content = "\n\ndeclare(strict_types=1);" . '<?php' . "\n\n// Do not edit. Content will be replaced." . "\nreturn " . VarDumper::create($mergePlan)->export(true) . ";\n"; if ($this->normalizeLineEndings($oldContent) !== $this->normalizeLineEndings($content)) { file_put_contents($filePath, $content, LOCK_EX); }
mutation / PHP 8.1-ubuntu-latest: src/Composer/MergePlanProcess.php#L155
Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ $filePath = $this->helper->getPaths()->absolute($this->helper->getMergePlanFile()); (new Filesystem())->ensureDirectoryExists(dirname($filePath)); $oldContent = is_file($filePath) ? file_get_contents($filePath) : ''; - $content = '<?php' . "\n\ndeclare(strict_types=1);" . "\n\n// Do not edit. Content will be replaced." . "\nreturn " . VarDumper::create($mergePlan)->export(true) . ";\n"; + $content = '<?php' . "\n\n// Do not edit. Content will be replaced." . "\nreturn " . VarDumper::create($mergePlan)->export(true) . ";\n"; if ($this->normalizeLineEndings($oldContent) !== $this->normalizeLineEndings($content)) { file_put_contents($filePath, $content, LOCK_EX); }
mutation / PHP 8.1-ubuntu-latest: src/Composer/MergePlanProcess.php#L155
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ $filePath = $this->helper->getPaths()->absolute($this->helper->getMergePlanFile()); (new Filesystem())->ensureDirectoryExists(dirname($filePath)); $oldContent = is_file($filePath) ? file_get_contents($filePath) : ''; - $content = '<?php' . "\n\ndeclare(strict_types=1);" . "\n\n// Do not edit. Content will be replaced." . "\nreturn " . VarDumper::create($mergePlan)->export(true) . ";\n"; + $content = '<?php' . "\n\n// Do not edit. Content will be replaced." . "\n\ndeclare(strict_types=1);" . "\nreturn " . VarDumper::create($mergePlan)->export(true) . ";\n"; if ($this->normalizeLineEndings($oldContent) !== $this->normalizeLineEndings($content)) { file_put_contents($filePath, $content, LOCK_EX); }
mutation / PHP 8.1-ubuntu-latest: src/Composer/MergePlanProcess.php#L155
Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ $filePath = $this->helper->getPaths()->absolute($this->helper->getMergePlanFile()); (new Filesystem())->ensureDirectoryExists(dirname($filePath)); $oldContent = is_file($filePath) ? file_get_contents($filePath) : ''; - $content = '<?php' . "\n\ndeclare(strict_types=1);" . "\n\n// Do not edit. Content will be replaced." . "\nreturn " . VarDumper::create($mergePlan)->export(true) . ";\n"; + $content = '<?php' . "\n\ndeclare(strict_types=1);" . "\nreturn " . VarDumper::create($mergePlan)->export(true) . ";\n"; if ($this->normalizeLineEndings($oldContent) !== $this->normalizeLineEndings($content)) { file_put_contents($filePath, $content, LOCK_EX); }