Skip to content

Fix codecov

Fix codecov #64

Triggered via pull request August 22, 2024 13:44
@vjikvjik
synchronize #21
vjik-patch-1
Status Success
Total duration 37s
Artifacts

mutation.yml

on: pull_request
Matrix: mutation / roave-infection
Fit to window
Zoom out
Zoom in

Annotations

7 warnings
mutation / PHP 8.2-ubuntu-latest: src/FileRouter.php#L106
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ * * @psalm-suppress InvalidPropertyFetch, MixedArrayAccess */ - $action = $possibleAction ?? ($controllerClass::$actions ?? ['HEAD' => 'head', 'OPTIONS' => 'options', 'GET' => 'index', 'POST' => 'create', 'PUT' => 'update', 'PATCH' => 'patch', 'DELETE' => 'delete'])[$request->getMethod()] ?? null; + $action = $possibleAction ?? ($controllerClass::$actions ?? ['OPTIONS' => 'options', 'GET' => 'index', 'POST' => 'create', 'PUT' => 'update', 'PATCH' => 'patch', 'DELETE' => 'delete'])[$request->getMethod()] ?? null; if ($action === null) { continue; }
mutation / PHP 8.2-ubuntu-latest: src/FileRouter.php#L116
Escaped Mutant for Mutator "Continue_": --- Original +++ New @@ @@ */ $action = $possibleAction ?? ($controllerClass::$actions ?? ['HEAD' => 'head', 'OPTIONS' => 'options', 'GET' => 'index', 'POST' => 'create', 'PUT' => 'update', 'PATCH' => 'patch', 'DELETE' => 'delete'])[$request->getMethod()] ?? null; if ($action === null) { - continue; + break; } if (!method_exists($controllerClass, $action)) { continue;
mutation / PHP 8.2-ubuntu-latest: src/FileRouter.php#L152
Escaped Mutant for Mutator "MBString": --- Original +++ New @@ @@ if (!str_starts_with($path, $this->routePrefix)) { return; } - $path = mb_substr($path, mb_strlen($this->routePrefix)); + $path = mb_substr($path, strlen($this->routePrefix)); if ($path === '') { $path = '/'; }
mutation / PHP 8.2-ubuntu-latest: src/FileRouter.php#L152
Escaped Mutant for Mutator "MBString": --- Original +++ New @@ @@ if (!str_starts_with($path, $this->routePrefix)) { return; } - $path = mb_substr($path, mb_strlen($this->routePrefix)); + $path = substr($path, mb_strlen($this->routePrefix)); if ($path === '') { $path = '/'; }
mutation / PHP 8.2-ubuntu-latest: src/FileRouter.php#L172
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ (yield [$this->cleanClassname($this->namespace . '\\' . $this->baseControllerDirectory . '\\' . $this->defaultControllerName . $this->classPostfix), $possibleAction]); return; } - $controllerName = preg_replace_callback('#(/.)#u', static fn(array $matches) => mb_strtoupper($matches[1]), $path); + $controllerName = preg_replace_callback('#(/.)#u', static fn(array $matches) => mb_strtoupper($matches[0]), $path); if (!preg_match('#^(.*?)/([^/]+)/?$#', $controllerName, $matches)) { return; }
mutation / PHP 8.2-ubuntu-latest: src/FileRouter.php#L190
Escaped Mutant for Mutator "PregMatchRemoveDollar": --- Original +++ New @@ @@ $directoryPath = $matches[1]; $controllerName = $matches[2]; (yield [$this->cleanClassname($this->namespace . '\\' . $this->baseControllerDirectory . '\\' . $directoryPath . '\\' . $controllerName . $this->classPostfix), $possibleAction]); - if (preg_match('#^(.*?)/([^/]+)/?$#', $directoryPath, $matches)) { + if (preg_match('#^(.*?)/([^/]+)/?#', $directoryPath, $matches)) { $possibleAction = strtolower($controllerName); $directoryPath = $matches[1]; $controllerName = $matches[2];
mutation / PHP 8.2-ubuntu-latest: src/FileRouter.php#L210
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ } private function cleanClassname(string $className) : string { - return str_replace(['\\/\\', '\\/', '\\\\'], '\\', $className); + return str_replace(['\\/', '\\\\'], '\\', $className); } }