Merge pull request #1250 from ergebnis/dependabot/composer/ergebnis/p… #2315
This run and associated checks have been archived and are scheduled for deletion.
Learn more about checks retention
integrate.yaml
on: push
Matrix: Backward-Compatibility Analysis
Matrix: Code Coverage
Matrix: Coding Standards
Matrix: Compile Phar
Matrix: Dependency Analysis
Matrix: Mutation Tests
Matrix: Refactoring
Matrix: Security Analysis
Matrix: Static Code Analysis
Matrix: Tests
Annotations
10 warnings
Mutation Tests (8.1, locked):
src/Command/NormalizeCommand.php#L45
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
}
protected function configure() : void
{
- $this->setDescription('Normalizes composer.json according to its JSON schema (https://getcomposer.org/schema.json).');
+
$this->setDefinition([new Console\Input\InputArgument('file', Console\Input\InputArgument::OPTIONAL, 'Path to composer.json file'), new Console\Input\InputOption('diff', null, Console\Input\InputOption::VALUE_NONE, 'Show the results of normalizing'), new Console\Input\InputOption('dry-run', null, Console\Input\InputOption::VALUE_NONE, 'Show the results of normalizing, but do not modify any files'), new Console\Input\InputOption('indent-size', null, Console\Input\InputOption::VALUE_REQUIRED, 'Indent size (an integer greater than 0); should be used with the --indent-style option'), new Console\Input\InputOption('indent-style', null, Console\Input\InputOption::VALUE_REQUIRED, \sprintf('Indent style (one of "%s"); should be used with the --indent-size option', \implode('", "', \array_keys(Normalizer\Format\Indent::CHARACTERS)))), new Console\Input\InputOption('no-check-lock', null, Console\Input\InputOption::VALUE_NONE, 'Do not check if lock file is up to date'), new Console\Input\InputOption('no-update-lock', null, Console\Input\InputOption::VALUE_NONE, 'Do not update lock file if it exists')]);
}
protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output) : int
|
Mutation Tests (8.1, locked):
src/Command/NormalizeCommand.php#L76
Escaped Mutant for Mutator "UnwrapArrayKeys":
--- Original
+++ New
@@ @@
protected function configure() : void
{
$this->setDescription('Normalizes composer.json according to its JSON schema (https://getcomposer.org/schema.json).');
- $this->setDefinition([new Console\Input\InputArgument('file', Console\Input\InputArgument::OPTIONAL, 'Path to composer.json file'), new Console\Input\InputOption('diff', null, Console\Input\InputOption::VALUE_NONE, 'Show the results of normalizing'), new Console\Input\InputOption('dry-run', null, Console\Input\InputOption::VALUE_NONE, 'Show the results of normalizing, but do not modify any files'), new Console\Input\InputOption('indent-size', null, Console\Input\InputOption::VALUE_REQUIRED, 'Indent size (an integer greater than 0); should be used with the --indent-style option'), new Console\Input\InputOption('indent-style', null, Console\Input\InputOption::VALUE_REQUIRED, \sprintf('Indent style (one of "%s"); should be used with the --indent-size option', \implode('", "', \array_keys(Normalizer\Format\Indent::CHARACTERS)))), new Console\Input\InputOption('no-check-lock', null, Console\Input\InputOption::VALUE_NONE, 'Do not check if lock file is up to date'), new Console\Input\InputOption('no-update-lock', null, Console\Input\InputOption::VALUE_NONE, 'Do not update lock file if it exists')]);
+ $this->setDefinition([new Console\Input\InputArgument('file', Console\Input\InputArgument::OPTIONAL, 'Path to composer.json file'), new Console\Input\InputOption('diff', null, Console\Input\InputOption::VALUE_NONE, 'Show the results of normalizing'), new Console\Input\InputOption('dry-run', null, Console\Input\InputOption::VALUE_NONE, 'Show the results of normalizing, but do not modify any files'), new Console\Input\InputOption('indent-size', null, Console\Input\InputOption::VALUE_REQUIRED, 'Indent size (an integer greater than 0); should be used with the --indent-style option'), new Console\Input\InputOption('indent-style', null, Console\Input\InputOption::VALUE_REQUIRED, \sprintf('Indent style (one of "%s"); should be used with the --indent-size option', \implode('", "', Normalizer\Format\Indent::CHARACTERS))), new Console\Input\InputOption('no-check-lock', null, Console\Input\InputOption::VALUE_NONE, 'Do not check if lock file is up to date'), new Console\Input\InputOption('no-update-lock', null, Console\Input\InputOption::VALUE_NONE, 'Do not update lock file if it exists')]);
}
protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output) : int
{
|
Mutation Tests (8.1, locked):
src/Command/NormalizeCommand.php#L100
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output) : int
{
$io = $this->getIO();
- $io->write([\sprintf('Running %s.', Version::long()), '']);
+ $io->write(['']);
$indent = null;
try {
$indentFromInput = self::indentFromInput($input);
|
Mutation Tests (8.1, locked):
src/Command/NormalizeCommand.php#L100
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output) : int
{
$io = $this->getIO();
- $io->write([\sprintf('Running %s.', Version::long()), '']);
+
$indent = null;
try {
$indentFromInput = self::indentFromInput($input);
|
Mutation Tests (8.1, locked):
src/Command/NormalizeCommand.php#L121
Escaped Mutant for Mutator "NotIdentical":
--- Original
+++ New
@@ @@
$io->writeError(\sprintf('<error>%s</error>', $exception->getMessage()));
return 1;
}
- if (null !== $indentFromInput) {
+ if (null === $indentFromInput) {
$indent = $indentFromInput;
}
$composerFile = $input->getArgument('file');
|
Mutation Tests (8.1, locked):
src/Command/NormalizeCommand.php#L136
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
$composerFile = Factory::getComposerFile();
}
$composer = $this->factory->createComposer($io, $composerFile);
- if (!$composer instanceof Composer) {
+ if (!true) {
throw Exception\ShouldNotHappen::create();
}
try {
|
Mutation Tests (8.1, locked):
src/Command/NormalizeCommand.php#L151
Escaped Mutant for Mutator "NotIdentical":
--- Original
+++ New
@@ @@
$io->writeError(\sprintf('<error>%s</error>', $exception->getMessage()));
return 1;
}
- if (null !== $indentFromExtra) {
+ if (null === $indentFromExtra) {
$indent = $indentFromExtra;
}
if (null !== $indentFromInput && null !== $indentFromExtra) {
|
Mutation Tests (8.1, locked):
src/Command/NormalizeCommand.php#L156
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
if (null !== $indentFromExtra) {
$indent = $indentFromExtra;
}
- if (null !== $indentFromInput && null !== $indentFromExtra) {
+ if (null !== $indentFromInput || null !== $indentFromExtra) {
$io->write('<warning>Configuration provided via options and composer extra. Using configuration from composer extra.</warning>');
}
if (false === $input->getOption('dry-run') && !\is_writable($composerFile)) {
|
Mutation Tests (8.1, locked):
src/Command/NormalizeCommand.php#L163
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
if (null !== $indentFromInput && null !== $indentFromExtra) {
$io->write('<warning>Configuration provided via options and composer extra. Using configuration from composer extra.</warning>');
}
- if (false === $input->getOption('dry-run') && !\is_writable($composerFile)) {
+ if (true === $input->getOption('dry-run') && !\is_writable($composerFile)) {
$io->writeError(\sprintf('<error>%s is not writable.</error>', $composerFile));
return 1;
}
|
Mutation Tests (8.1, locked):
src/Command/NormalizeCommand.php#L163
Escaped Mutant for Mutator "Identical":
--- Original
+++ New
@@ @@
if (null !== $indentFromInput && null !== $indentFromExtra) {
$io->write('<warning>Configuration provided via options and composer extra. Using configuration from composer extra.</warning>');
}
- if (false === $input->getOption('dry-run') && !\is_writable($composerFile)) {
+ if (false !== $input->getOption('dry-run') && !\is_writable($composerFile)) {
$io->writeError(\sprintf('<error>%s is not writable.</error>', $composerFile));
return 1;
}
|