refactor: Migrate Box FileSystem to Fidry FileSystem #1073
Annotations
1 error and 10 warnings
|
src/Configuration/Configuration.php#L1862
Escaped Mutant for Mutator "UnwrapTrim":
--- Original
+++ New
@@ @@
foreach ((array) $raw->{self::MAP_KEY} as $item) {
$processed = [];
foreach ($item as $match => $replace) {
- $processed[Path::canonicalize(trim($match))] = Path::canonicalize(trim($replace));
+ $processed[Path::canonicalize($match)] = Path::canonicalize(trim($replace));
}
if (isset($processed['_empty_'])) {
$processed[''] = $processed['_empty_'];
|
src/Configuration/Configuration.php#L1862
Escaped Mutant for Mutator "UnwrapTrim":
--- Original
+++ New
@@ @@
foreach ((array) $raw->{self::MAP_KEY} as $item) {
$processed = [];
foreach ($item as $match => $replace) {
- $processed[Path::canonicalize(trim($match))] = Path::canonicalize(trim($replace));
+ $processed[Path::canonicalize(trim($match))] = Path::canonicalize($replace);
}
if (isset($processed['_empty_'])) {
$processed[''] = $processed['_empty_'];
|
src/Configuration/Configuration.php#L2668
Escaped Mutant for Mutator "UnwrapArrayValues":
--- Original
+++ New
@@ @@
private static function createPhpScoperCompactor(stdClass $raw, string $basePath, ConfigurationLogger $logger) : Compactor
{
$phpScoperConfig = self::configurePhpScoperPrefix(self::retrievePhpScoperConfig($raw, $basePath, $logger));
- $excludedFilePaths = array_values(array_unique(array_map(static fn(string $path): string => Path::makeRelative($path, $basePath), array_keys($phpScoperConfig->getExcludedFilesWithContents()))));
+ $excludedFilePaths = array_unique(array_map(static fn(string $path): string => Path::makeRelative($path, $basePath), array_keys($phpScoperConfig->getExcludedFilesWithContents())));
return new PhpScoperCompactor(new SerializableScoper($phpScoperConfig, ...$excludedFilePaths));
}
private static function configurePhpScoperPrefix(PhpScoperConfiguration $phpScoperConfig) : PhpScoperConfiguration
|
src/Configuration/Configuration.php#L2669
Escaped Mutant for Mutator "UnwrapArrayUnique":
--- Original
+++ New
@@ @@
private static function createPhpScoperCompactor(stdClass $raw, string $basePath, ConfigurationLogger $logger) : Compactor
{
$phpScoperConfig = self::configurePhpScoperPrefix(self::retrievePhpScoperConfig($raw, $basePath, $logger));
- $excludedFilePaths = array_values(array_unique(array_map(static fn(string $path): string => Path::makeRelative($path, $basePath), array_keys($phpScoperConfig->getExcludedFilesWithContents()))));
+ $excludedFilePaths = array_values(array_map(static fn(string $path): string => Path::makeRelative($path, $basePath), array_keys($phpScoperConfig->getExcludedFilesWithContents())));
return new PhpScoperCompactor(new SerializableScoper($phpScoperConfig, ...$excludedFilePaths));
}
private static function configurePhpScoperPrefix(PhpScoperConfiguration $phpScoperConfig) : PhpScoperConfiguration
|
src/Configuration/Configuration.php#L2670
Escaped Mutant for Mutator "UnwrapArrayMap":
--- Original
+++ New
@@ @@
private static function createPhpScoperCompactor(stdClass $raw, string $basePath, ConfigurationLogger $logger) : Compactor
{
$phpScoperConfig = self::configurePhpScoperPrefix(self::retrievePhpScoperConfig($raw, $basePath, $logger));
- $excludedFilePaths = array_values(array_unique(array_map(static fn(string $path): string => Path::makeRelative($path, $basePath), array_keys($phpScoperConfig->getExcludedFilesWithContents()))));
+ $excludedFilePaths = array_values(array_unique(array_keys($phpScoperConfig->getExcludedFilesWithContents())));
return new PhpScoperCompactor(new SerializableScoper($phpScoperConfig, ...$excludedFilePaths));
}
private static function configurePhpScoperPrefix(PhpScoperConfiguration $phpScoperConfig) : PhpScoperConfiguration
|
src/Console/Command/Extract.php#L99
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$internal
));
if ($canDelete) {
- FS::remove($outputDir);
+
// Continue
} else {
// Do nothing
|
src/Console/Command/Extract.php#L107
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
return ExitCode::FAILURE;
}
}
- FS::mkdir($outputDir);
+
try {
self::dumpPhar($pharPath, $outputDir);
} catch (InvalidPhar $invalidPhar) {
|
src/Console/Command/Extract.php#L156
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
$pubKeyContent = null;
$tmpPubKey = $tmpFile . '.pubkey';
try {
- FS::copy($file, $tmpFile, true);
+ FS::copy($file, $tmpFile, false);
if (file_exists($pubKey)) {
FS::copy($pubKey, $tmpPubKey, true);
$pubKeyContent = FS::getFileContents($pubKey);
|
src/Console/Command/Extract.php#L159
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
try {
FS::copy($file, $tmpFile, true);
if (file_exists($pubKey)) {
- FS::copy($pubKey, $tmpPubKey, true);
+ FS::copy($pubKey, $tmpPubKey, false);
$pubKeyContent = FS::getFileContents($pubKey);
}
$phar = PharFactory::create($tmpFile);
|
src/Console/Command/Extract.php#L168
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
$pharMeta = PharMeta::fromPhar($phar, $pubKeyContent);
$phar->extractTo($tmpDir);
} catch (Throwable $throwable) {
- FS::remove([$tmpFile, $tmpPubKey]);
+ FS::remove([$tmpPubKey]);
throw $throwable;
}
FS::dumpFile($tmpDir . DIRECTORY_SEPARATOR . self::PHAR_META_PATH, $pharMeta->toJson());
|
The logs for this run have expired and are no longer available.
Loading