Fix psalm #755
Annotations
10 warnings
mutation / PHP 8.2-ubuntu-latest:
src/Command/InfoCommand.php#L36
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
$package = $composer->getRepositoryManager()->getLocalRepository()->findPackage($packageName, '*');
if ($package === null) {
$io->error('Package "' . $packageName . '" not found.');
- return 1;
+ return 2;
}
return $this->vendorPackage($composer, $package, $io);
}
|
mutation / PHP 8.2-ubuntu-latest:
src/Command/InfoCommand.php#L48
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
{
$settings = ConfigSettings::forVendorPackage($composer, $package);
if (empty($settings->packageConfiguration())) {
- $io->writeln('');
+
$io->writeln('<fg=gray>Configuration don\'t found in package "' . $package->getName() . '".</>');
return 0;
}
|
mutation / PHP 8.2-ubuntu-latest:
src/Command/InfoCommand.php#L50
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
if (empty($settings->packageConfiguration())) {
$io->writeln('');
$io->writeln('<fg=gray>Configuration don\'t found in package "' . $package->getName() . '".</>');
- return 0;
+ return -1;
}
$io->title('Yii Config — Package "' . $package->getName() . '"');
$io->writeln('Source directory: ' . $settings->path() . '/' . $settings->options()->sourceDirectory());
|
mutation / PHP 8.2-ubuntu-latest:
src/Command/InfoCommand.php#L83
Escaped Mutant for Mutator "Concat":
--- Original
+++ New
@@ @@
$mergePlanFilePath = $settings->path() . '/' . (empty($sourceDirectory) ? '' : $sourceDirectory . '/') . $options->mergePlanFile();
$io->title('Yii Config — Root Configuration');
$io->section('Options');
- $io->table([], [['Build merge plan', $options->buildMergePlan() ? '<fg=green>yes</>' : '<fg=red>no</>'], ['Merge plan file path', file_exists($mergePlanFilePath) ? '<fg=green>' . $mergePlanFilePath . '</>' : '<fg=red>' . $mergePlanFilePath . ' (not exists)</>'], ['Package types', empty($options->packageTypes()) ? '<fg=red>not set</>' : implode(', ', $options->packageTypes())], ['Source directory', $settings->path() . '/' . $options->sourceDirectory()], ['Vendor override layer packages', empty($options->vendorOverrideLayerPackages()) ? '<fg=gray>not set</>' : implode(', ', $options->vendorOverrideLayerPackages())]]);
+ $io->table([], [['Build merge plan', $options->buildMergePlan() ? '<fg=green>yes</>' : '<fg=red>no</>'], ['Merge plan file path', file_exists($mergePlanFilePath) ? $mergePlanFilePath . '<fg=green>' . '</>' : '<fg=red>' . $mergePlanFilePath . ' (not exists)</>'], ['Package types', empty($options->packageTypes()) ? '<fg=red>not set</>' : implode(', ', $options->packageTypes())], ['Source directory', $settings->path() . '/' . $options->sourceDirectory()], ['Vendor override layer packages', empty($options->vendorOverrideLayerPackages()) ? '<fg=gray>not set</>' : implode(', ', $options->vendorOverrideLayerPackages())]]);
$io->section('Configuration groups');
$this->writeConfiguration($io, $settings->packageConfiguration());
$io->section('Environments');
|
mutation / PHP 8.2-ubuntu-latest:
src/Command/InfoCommand.php#L83
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
$mergePlanFilePath = $settings->path() . '/' . (empty($sourceDirectory) ? '' : $sourceDirectory . '/') . $options->mergePlanFile();
$io->title('Yii Config — Root Configuration');
$io->section('Options');
- $io->table([], [['Build merge plan', $options->buildMergePlan() ? '<fg=green>yes</>' : '<fg=red>no</>'], ['Merge plan file path', file_exists($mergePlanFilePath) ? '<fg=green>' . $mergePlanFilePath . '</>' : '<fg=red>' . $mergePlanFilePath . ' (not exists)</>'], ['Package types', empty($options->packageTypes()) ? '<fg=red>not set</>' : implode(', ', $options->packageTypes())], ['Source directory', $settings->path() . '/' . $options->sourceDirectory()], ['Vendor override layer packages', empty($options->vendorOverrideLayerPackages()) ? '<fg=gray>not set</>' : implode(', ', $options->vendorOverrideLayerPackages())]]);
+ $io->table([], [['Build merge plan', $options->buildMergePlan() ? '<fg=green>yes</>' : '<fg=red>no</>'], ['Merge plan file path', file_exists($mergePlanFilePath) ? '<fg=green>' . $mergePlanFilePath : '<fg=red>' . $mergePlanFilePath . ' (not exists)</>'], ['Package types', empty($options->packageTypes()) ? '<fg=red>not set</>' : implode(', ', $options->packageTypes())], ['Source directory', $settings->path() . '/' . $options->sourceDirectory()], ['Vendor override layer packages', empty($options->vendorOverrideLayerPackages()) ? '<fg=gray>not set</>' : implode(', ', $options->vendorOverrideLayerPackages())]]);
$io->section('Configuration groups');
$this->writeConfiguration($io, $settings->packageConfiguration());
$io->section('Environments');
|
mutation / PHP 8.2-ubuntu-latest:
src/Command/InfoCommand.php#L84
Escaped Mutant for Mutator "Concat":
--- Original
+++ New
@@ @@
$mergePlanFilePath = $settings->path() . '/' . (empty($sourceDirectory) ? '' : $sourceDirectory . '/') . $options->mergePlanFile();
$io->title('Yii Config — Root Configuration');
$io->section('Options');
- $io->table([], [['Build merge plan', $options->buildMergePlan() ? '<fg=green>yes</>' : '<fg=red>no</>'], ['Merge plan file path', file_exists($mergePlanFilePath) ? '<fg=green>' . $mergePlanFilePath . '</>' : '<fg=red>' . $mergePlanFilePath . ' (not exists)</>'], ['Package types', empty($options->packageTypes()) ? '<fg=red>not set</>' : implode(', ', $options->packageTypes())], ['Source directory', $settings->path() . '/' . $options->sourceDirectory()], ['Vendor override layer packages', empty($options->vendorOverrideLayerPackages()) ? '<fg=gray>not set</>' : implode(', ', $options->vendorOverrideLayerPackages())]]);
+ $io->table([], [['Build merge plan', $options->buildMergePlan() ? '<fg=green>yes</>' : '<fg=red>no</>'], ['Merge plan file path', file_exists($mergePlanFilePath) ? '<fg=green>' . $mergePlanFilePath . '</>' : $mergePlanFilePath . '<fg=red>' . ' (not exists)</>'], ['Package types', empty($options->packageTypes()) ? '<fg=red>not set</>' : implode(', ', $options->packageTypes())], ['Source directory', $settings->path() . '/' . $options->sourceDirectory()], ['Vendor override layer packages', empty($options->vendorOverrideLayerPackages()) ? '<fg=gray>not set</>' : implode(', ', $options->vendorOverrideLayerPackages())]]);
$io->section('Configuration groups');
$this->writeConfiguration($io, $settings->packageConfiguration());
$io->section('Environments');
|
mutation / PHP 8.2-ubuntu-latest:
src/Command/InfoCommand.php#L84
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
$mergePlanFilePath = $settings->path() . '/' . (empty($sourceDirectory) ? '' : $sourceDirectory . '/') . $options->mergePlanFile();
$io->title('Yii Config — Root Configuration');
$io->section('Options');
- $io->table([], [['Build merge plan', $options->buildMergePlan() ? '<fg=green>yes</>' : '<fg=red>no</>'], ['Merge plan file path', file_exists($mergePlanFilePath) ? '<fg=green>' . $mergePlanFilePath . '</>' : '<fg=red>' . $mergePlanFilePath . ' (not exists)</>'], ['Package types', empty($options->packageTypes()) ? '<fg=red>not set</>' : implode(', ', $options->packageTypes())], ['Source directory', $settings->path() . '/' . $options->sourceDirectory()], ['Vendor override layer packages', empty($options->vendorOverrideLayerPackages()) ? '<fg=gray>not set</>' : implode(', ', $options->vendorOverrideLayerPackages())]]);
+ $io->table([], [['Build merge plan', $options->buildMergePlan() ? '<fg=green>yes</>' : '<fg=red>no</>'], ['Merge plan file path', file_exists($mergePlanFilePath) ? '<fg=green>' . $mergePlanFilePath . '</>' : '<fg=red>' . ' (not exists)</>'], ['Package types', empty($options->packageTypes()) ? '<fg=red>not set</>' : implode(', ', $options->packageTypes())], ['Source directory', $settings->path() . '/' . $options->sourceDirectory()], ['Vendor override layer packages', empty($options->vendorOverrideLayerPackages()) ? '<fg=gray>not set</>' : implode(', ', $options->vendorOverrideLayerPackages())]]);
$io->section('Configuration groups');
$this->writeConfiguration($io, $settings->packageConfiguration());
$io->section('Environments');
|
mutation / PHP 8.2-ubuntu-latest:
src/Command/InfoCommand.php#L84
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
$mergePlanFilePath = $settings->path() . '/' . (empty($sourceDirectory) ? '' : $sourceDirectory . '/') . $options->mergePlanFile();
$io->title('Yii Config — Root Configuration');
$io->section('Options');
- $io->table([], [['Build merge plan', $options->buildMergePlan() ? '<fg=green>yes</>' : '<fg=red>no</>'], ['Merge plan file path', file_exists($mergePlanFilePath) ? '<fg=green>' . $mergePlanFilePath . '</>' : '<fg=red>' . $mergePlanFilePath . ' (not exists)</>'], ['Package types', empty($options->packageTypes()) ? '<fg=red>not set</>' : implode(', ', $options->packageTypes())], ['Source directory', $settings->path() . '/' . $options->sourceDirectory()], ['Vendor override layer packages', empty($options->vendorOverrideLayerPackages()) ? '<fg=gray>not set</>' : implode(', ', $options->vendorOverrideLayerPackages())]]);
+ $io->table([], [['Build merge plan', $options->buildMergePlan() ? '<fg=green>yes</>' : '<fg=red>no</>'], ['Merge plan file path', file_exists($mergePlanFilePath) ? '<fg=green>' . $mergePlanFilePath . '</>' : '<fg=red>' . $mergePlanFilePath], ['Package types', empty($options->packageTypes()) ? '<fg=red>not set</>' : implode(', ', $options->packageTypes())], ['Source directory', $settings->path() . '/' . $options->sourceDirectory()], ['Vendor override layer packages', empty($options->vendorOverrideLayerPackages()) ? '<fg=gray>not set</>' : implode(', ', $options->vendorOverrideLayerPackages())]]);
$io->section('Configuration groups');
$this->writeConfiguration($io, $settings->packageConfiguration());
$io->section('Environments');
|
mutation / PHP 8.2-ubuntu-latest:
src/Command/InfoCommand.php#L112
Escaped Mutant for Mutator "IfNegation":
--- Original
+++ New
@@ @@
} else {
$isFirst = true;
foreach ($environmentsConfiguration as $environment => $groups) {
- if ($isFirst) {
+ if (!$isFirst) {
$isFirst = false;
} else {
$io->newLine();
|
mutation / PHP 8.2-ubuntu-latest:
src/Command/InfoCommand.php#L122
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
$io->writeln(' <fg=gray>(empty)</>');
} else {
$io->newLine();
- $this->writeConfiguration($io, $groups, offset: 2, addSeparateLine: false);
+ $this->writeConfiguration($io, $groups, offset: 3, addSeparateLine: false);
}
}
}
|