Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
37 | public function __invoke(int $authorId, Request $request): BaseHttpResponse|JsonResponse|JsonResource|RedirectResponse |
||
38 | { |
||
39 | $user = User::query() |
||
40 | ->with('posts') |
||
41 | ->whereId($authorId) |
||
42 | ->first(); |
||
43 | |||
44 | if (!$user) { |
||
45 | return $this |
||
46 | ->httpResponse() |
||
47 | ->setError() |
||
48 | ->setCode(404) |
||
49 | ->setMessage('Not found'); |
||
50 | } |
||
51 | |||
52 | return $this |
||
53 | ->httpResponse() |
||
54 | ->setData(new AuthorWithPostResource($user)) |
||
55 | ->toApiResponse(); |
||
56 | } |
||
58 |
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