Test Setup Failed
Push — master ( 7ec5cf...f827c6 )
by Phan
04:13
created

API/Interaction/BatchLikeController.php (1 issue)

Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace App\Http\Controllers\API\Interaction;
4
5
use App\Http\Requests\API\BatchInteractionRequest;
6
use App\Models\Interaction;
7
use Illuminate\Http\JsonResponse;
8
9
class BatchLikeController extends Controller
10
{
11
    /**
12
     * Like several songs at once as the currently authenticated user.
13
     *
14
     * @param BatchInteractionRequest $request
15
     *
16
     * @return JsonResponse
17
     */
18
    function store(BatchInteractionRequest $request)
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
19
    {
20
        return response()->json(Interaction::batchLike((array) $request->songs, $request->user()));
21
    }
22
23
    /**
24
     * Unlike several songs at once as the currently authenticated user.
25
     *
26
     * @param BatchInteractionRequest $request
27
     *
28
     * @return JsonResponse
29
     */
30
    public function destroy(BatchInteractionRequest $request)
31
    {
32
        return response()->json(Interaction::batchUnlike((array) $request->songs, $request->user()));
33
    }
34
}
35