Skip to content

Merge pull request #312 from gacela-project/feat/move-gacela-to-bin #137

Merge pull request #312 from gacela-project/feat/move-gacela-to-bin

Merge pull request #312 from gacela-project/feat/move-gacela-to-bin #137

Triggered via push May 9, 2024 09:04
Status Success
Total duration 1m 7s
Artifacts
Mutation Tests
55s
Mutation Tests
Fit to window
Zoom out
Zoom in

Annotations

11 warnings
Mutation Tests
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Mutation Tests: src/Console/ConsoleFacade.php#L33
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ { return $this->getFactory()->createCommandArgumentsParser()->parse($desiredNamespace); } - public function generateFileContent(CommandArguments $commandArguments, string $filename, bool $withShortName = false) : string + public function generateFileContent(CommandArguments $commandArguments, string $filename, bool $withShortName = true) : string { return $this->getFactory()->createFileContentGenerator()->generate($commandArguments, $filename, $withShortName); }
Mutation Tests: src/Console/ConsoleFactory.php#L38
Escaped Mutant for Mutator "CastArray": --- Original +++ New @@ @@ */ public function getConsoleCommands() : array { - return (array) $this->getProvidedDependency(ConsoleDependencyProvider::COMMANDS); + return $this->getProvidedDependency(ConsoleDependencyProvider::COMMANDS); } public function createCommandArgumentsParser() : CommandArgumentsParserInterface {
Mutation Tests: src/Console/ConsoleFactory.php#L98
Escaped Mutant for Mutator "CastArray": --- Original +++ New @@ @@ */ private function getTemplateByFilenameMap() : array { - return (array) $this->getProvidedDependency(ConsoleDependencyProvider::TEMPLATE_BY_FILENAME_MAP); + return $this->getProvidedDependency(ConsoleDependencyProvider::TEMPLATE_BY_FILENAME_MAP); } }
Mutation Tests: src/Console/Domain/AllAppModules/AllAppModulesFinder.php#L42
Escaped Mutant for Mutator "LogicalOr": --- Original +++ New @@ @@ } private function createAppModule(SplFileInfo $fileInfo, string $filter) : ?AppModule { - if (!$fileInfo->isFile() || $fileInfo->getExtension() !== 'php' || str_contains($fileInfo->getRealPath(), 'vendor' . DIRECTORY_SEPARATOR)) { + if (!$fileInfo->isFile() && $fileInfo->getExtension() !== 'php' || str_contains($fileInfo->getRealPath(), 'vendor' . DIRECTORY_SEPARATOR)) { return null; } $namespace = $this->getNamespace($fileInfo);
Mutation Tests: src/Console/Domain/AllAppModules/AllAppModulesFinder.php#L44
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ } private function createAppModule(SplFileInfo $fileInfo, string $filter) : ?AppModule { - if (!$fileInfo->isFile() || $fileInfo->getExtension() !== 'php' || str_contains($fileInfo->getRealPath(), 'vendor' . DIRECTORY_SEPARATOR)) { + if (!$fileInfo->isFile() || $fileInfo->getExtension() !== 'php' || str_contains($fileInfo->getRealPath(), DIRECTORY_SEPARATOR . 'vendor')) { return null; } $namespace = $this->getNamespace($fileInfo);
Mutation Tests: src/Console/Domain/AllAppModules/AllAppModulesFinder.php#L44
Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ } private function createAppModule(SplFileInfo $fileInfo, string $filter) : ?AppModule { - if (!$fileInfo->isFile() || $fileInfo->getExtension() !== 'php' || str_contains($fileInfo->getRealPath(), 'vendor' . DIRECTORY_SEPARATOR)) { + if (!$fileInfo->isFile() || $fileInfo->getExtension() !== 'php' || str_contains($fileInfo->getRealPath(), 'vendor')) { return null; } $namespace = $this->getNamespace($fileInfo);
Mutation Tests: src/Console/Domain/AllAppModules/AllAppModulesFinder.php#L74
Escaped Mutant for Mutator "CastString": --- Original +++ New @@ @@ } private function getNamespace(SplFileInfo $fileInfo) : string { - $fileContent = (string) file_get_contents($fileInfo->getRealPath()); + $fileContent = file_get_contents($fileInfo->getRealPath()); preg_match('#namespace (.*);#', $fileContent, $matches); return $matches[1] ?? ''; }
Mutation Tests: src/Console/Domain/AllAppModules/AllAppModulesFinder.php#L86
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ { $pieces = explode(DIRECTORY_SEPARATOR, $fileInfo->getFilename()); $filename = end($pieces); - return substr($filename, 0, strpos($filename, '.') ?: 1); + return substr($filename, 0, strpos($filename, '.') ?: 0); } private function isFacade(AppModule $appModule) : bool {
Mutation Tests: src/Console/Domain/AllAppModules/AllAppModulesFinder.php#L86
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ { $pieces = explode(DIRECTORY_SEPARATOR, $fileInfo->getFilename()); $filename = end($pieces); - return substr($filename, 0, strpos($filename, '.') ?: 1); + return substr($filename, 0, strpos($filename, '.') ?: 2); } private function isFacade(AppModule $appModule) : bool {
Mutation Tests: src/Console/Domain/CommandArguments/CommandArgumentsException.php#L26
Escaped Mutant for Mutator "UnwrapArrayMap": --- Original +++ New @@ @@ */ public static function noAutoloadPsr4MatchFound(string $desiredNamespace, array $knownPsr4 = []) : self { - $parsedKnownPsr4 = array_map(static fn(string $p): string => str_replace('\\', '', $p), $knownPsr4); + $parsedKnownPsr4 = $knownPsr4; return new self(sprintf('No autoload psr-4 match found for %s. Known PSR-4: %s', $desiredNamespace, implode(', ', $parsedKnownPsr4))); } }