1 | <?php |
||
2 | |||
3 | namespace FaithGen\SDK\Http\Controllers; |
||
4 | |||
5 | use FaithGen\Gallery\Http\Requests\ImageCommentRequest; |
||
0 ignored issues
–
show
|
|||
6 | use FaithGen\SDK\Helpers\CommentHelper; |
||
7 | use FaithGen\SDK\Models\Image; |
||
8 | use FaithGen\SDK\Services\ImageService; |
||
9 | use Illuminate\Http\Request; |
||
10 | use Illuminate\Routing\Controller; |
||
11 | |||
12 | class ImageController extends Controller |
||
13 | { |
||
14 | protected $imageService; |
||
15 | |||
16 | public function __construct(ImageService $imageService) |
||
17 | { |
||
18 | $this->imageService = $imageService; |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * Sends a comment to an image. |
||
23 | * |
||
24 | * @param \FaithGen\Gallery\Http\Requests\ImageCommentRequest $request |
||
25 | * |
||
26 | * @return \Illuminate\Http\JsonResponse |
||
27 | */ |
||
28 | public function comment(ImageCommentRequest $request) |
||
29 | { |
||
30 | return CommentHelper::createComment($this->imageService->getImage(), $request); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * Fetches the comments for this image. |
||
35 | * |
||
36 | * @param \Illuminate\Http\Request $request |
||
37 | * @param \FaithGen\SDK\Models\Image $image |
||
38 | * |
||
39 | * @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection |
||
40 | */ |
||
41 | public function comments(Request $request, Image $image) |
||
42 | { |
||
43 | return CommentHelper::getComments($image, $request); |
||
44 | } |
||
45 | } |
||
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