| Conditions | 2 |
| Paths | 2 |
| Total Lines | 20 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function index(CurrentRoute $currentRoute, TagRepository $tagRepository, PostRepository $postRepository, ResponseFactoryInterface $responseFactory): Response |
||
| 25 | { |
||
| 26 | $label = $currentRoute->getArgument('label'); |
||
| 27 | $pageNum = (int) $currentRoute->getArgument('page', '1'); |
||
| 28 | $item = $tagRepository->findByLabel($label); |
||
| 29 | |||
| 30 | if ($item === null) { |
||
| 31 | return $responseFactory->createResponse(404); |
||
| 32 | } |
||
| 33 | // preloading of posts |
||
| 34 | $paginator = (new OffsetPaginator($postRepository->findByTag($item->getId()))) |
||
| 35 | ->withPageSize(self::POSTS_PER_PAGE) |
||
| 36 | ->withCurrentPage($pageNum); |
||
| 37 | |||
| 38 | $data = [ |
||
| 39 | 'item' => $item, |
||
| 40 | 'paginator' => $paginator, |
||
| 41 | ]; |
||
| 42 | |||
| 43 | return $this->viewRenderer->render('index', $data); |
||
| 44 | } |
||
| 46 |
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