Total Complexity | 3 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | class WebRouter implements RouterInterface, WebRouterInterface |
||
18 | { |
||
19 | public function __construct( |
||
20 | #[DefaultSchemeHost] |
||
21 | private string $schemeHost, |
||
22 | private HttpMethodParamsInterface $httpMethodParams, |
||
23 | ) { |
||
24 | } |
||
25 | |||
26 | 41 | /** |
|
27 | * @param array{HTTP_X_HTTP_METHOD_OVERRIDE?: string, REQUEST_METHOD: string, REQUEST_URI: string, ...} $server |
||
28 | 41 | * @param array{_GET: array<string|array>, _POST: array<string|array>} $globals |
|
29 | 41 | */ |
|
30 | 41 | ||
31 | /** |
||
32 | * {@inheritDoc} |
||
33 | * |
||
34 | * @param Globals $globals |
||
|
|||
35 | 8 | * @param Server $server |
|
36 | */ |
||
37 | 8 | public function match(array $globals, array $server) |
|
38 | 8 | { |
|
39 | 8 | $requestUri = $server['REQUEST_URI']; |
|
40 | $get = $globals['_GET']; |
||
41 | 8 | $post = $globals['_POST']; |
|
42 | [$method, $query] = $this->httpMethodParams->get($server, $get, $post); |
||
43 | $path = $this->schemeHost . parse_url($requestUri, 5); // 5 = PHP_URL_PATH |
||
44 | |||
45 | return new RouterMatch($method, $path, $query); |
||
46 | } |
||
47 | 9 | ||
48 | /** |
||
49 | 9 | * {@inheritDoc} |
|
50 | */ |
||
51 | public function generate($name, $data) |
||
54 | } |
||
55 | } |
||
56 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths