refactor: Move the checksum mode to the --diff option #1143
Annotations
1 error and 2 warnings
|
src/Console/Command/Diff.php#L231
Escaped Mutant for Mutator "LogicalOr":
--- Original
+++ New
@@ @@
$io->writeln(sprintf('⚠️ <warning>Using the option "%s" is deprecated. Use "--%s=%s" instead.</warning>', self::LIST_FILES_DIFF_OPTION, self::DIFF_OPTION, DiffMode::FILE_NAME->value));
return DiffMode::FILE_NAME;
}
- if ($io->hasOption('-c') || $io->hasOption('--check')) {
+ if ($io->hasOption('-c') && $io->hasOption('--check')) {
$io->writeln(sprintf('⚠️ <warning>Using the option "%s" is deprecated. Use "--%s=%s" instead.</warning>', self::CHECK_OPTION, self::DIFF_OPTION, DiffMode::CHECKSUM->value));
return DiffMode::FILE_NAME;
}
|
src/Console/Command/Diff.php#L263
Escaped Mutant for Mutator "Coalesce":
--- Original
+++ New
@@ @@
$io->writeln(sprintf('⚠️ <warning>Using the option "%s" is deprecated. Use "--%s=\\<algorithm\\>" instead.</warning>', self::CHECK_OPTION, self::CHECKSUM_ALGORITHM_OPTION));
return $checksumAlgorithm;
}
- return $io->getOption(self::CHECKSUM_ALGORITHM_OPTION)->asNullableNonEmptyString() ?? self::DEFAULT_CHECKSUM_ALGO;
+ return self::DEFAULT_CHECKSUM_ALGO ?? $io->getOption(self::CHECKSUM_ALGORITHM_OPTION)->asNullableNonEmptyString();
}
private function renderContentsDiff(PharDiff $diff, DiffMode $diffMode, string $checksumAlgorithm, IO $io) : void
{
|
The logs for this run have expired and are no longer available.
Loading