Skip to content

major refactoring of tests and code + remove some features + add better features #28

major refactoring of tests and code + remove some features + add better features

major refactoring of tests and code + remove some features + add better features #28

Triggered via pull request February 27, 2024 22:11
Status Failure
Total duration 1m 47s
Artifacts

2-code-quality.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

5 errors and 2 warnings
build: src/Route.php#L142
Method IngeniozIT\Router\Route::extractPatterns() has parameter $where with no value type specified in iterable type array.
build: src/Route.php#L142
Method IngeniozIT\Router\Route::extractPatterns() return type has no value type specified in iterable type array.
build: src/Router.php#L112
Method IngeniozIT\Router\Router::pathTo() has parameter $parameters with no value type specified in iterable type array.
build: src/Router.php#L123
Method IngeniozIT\Router\Router::findNamedRoute() has parameter $parameters with no value type specified in iterable type array.
build
Process completed with exit code 1.
build
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
build: src/Route.php#L144
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ } private function extractPatterns(array $where, string $path) : array { - if ($this->hasParameters && str_contains($path, ':') && preg_match_all('#{(\\w+):([^}]+)}#', $path, $matches, PREG_SET_ORDER)) { + if (($this->hasParameters || str_contains($path, ':')) && preg_match_all('#{(\\w+):([^}]+)}#', $path, $matches, PREG_SET_ORDER)) { foreach ($matches as $match) { $path = str_replace($match[0], '{' . $match[1] . '}', $path); $where[$match[1]] = $match[2];