| Conditions | 2 |
| Paths | 2 |
| Total Lines | 41 |
| Code Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function benchZendMatch() |
||
| 31 | { |
||
| 32 | $router = new TreeRouteStack(); |
||
| 33 | |||
| 34 | for ($i = 1; $i <= $this->maxRoutes; $i++) |
||
| 35 | { |
||
| 36 | $id = \sprintf('route:%d', $i); |
||
| 37 | $path = \sprintf('/route/%d', $i); |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @link https://github.com/zendframework/zend-expressive-zendrouter/blob/master/src/ZendRouter.php |
||
| 41 | */ |
||
| 42 | $router->addRoute($id, [ |
||
| 43 | 'type' => 'segment', |
||
| 44 | 'options' => [ |
||
| 45 | 'route' => $path, |
||
| 46 | ], |
||
| 47 | 'may_terminate' => false, |
||
| 48 | 'child_routes' => [ |
||
| 49 | 'GET' => [ |
||
| 50 | 'type' => 'method', |
||
| 51 | 'options' => [ |
||
| 52 | 'verb' => 'GET', |
||
| 53 | ], |
||
| 54 | ], |
||
| 55 | 'method_not_allowed'=> [ |
||
| 56 | 'type' => 'regex', |
||
| 57 | 'priority' => -1, |
||
| 58 | 'options' => [ |
||
| 59 | 'regex' => '', |
||
| 60 | 'defaults' => [ |
||
| 61 | 'method_not_allowed' => $path, |
||
| 62 | ], |
||
| 63 | 'spec' => '', |
||
| 64 | ], |
||
| 65 | ], |
||
| 66 | ], |
||
| 67 | ]); |
||
| 68 | } |
||
| 69 | |||
| 70 | $router->match(Psr7ServerRequest::toZend($this->request, true)); |
||
| 71 | } |
||
| 73 |
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