Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Push — development ( f5a703...65354c )
by José
03:44
created

CampaignController::update()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 48
Code Lines 28

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 48
rs 9.125
cc 3
eloc 28
nc 3
nop 2
1
<?php
2
3
namespace DoeSangue\Http\Controllers\API\V1;
4
5
use DoeSangue\Http\Controllers\Controller;
6
use DoeSangue\Models\Campaign;
7
use DoeSangue\Http\Resources\Campaign as CampaignResource;
8
use DoeSangue\Http\Resources\CampaignCollection;
9
10
11
class CampaignController extends Controller
12
{
13
    /**
14
     * Initialize the class
15
     * and set the middleware
16
     */
17
    public function __construct()
18
    {
19
        $this->middleware('jwt.auth', [ 'except' => [ 'index', 'show' ] ]);
20
    }
21
22
    /**
23
     * Get all campaigns
24
     * 20 queries per page
25
     *
26
     * @return \Illuminate\Http\JsonResponse
27
     */
28
    public function index()
29
    {
30
        return new CampaignCollection(Campaign::paginate(30));
31
    }
32
33
    /**
34
     * Get all details of a campaign
35
     *
36
     * @param  integer $id
0 ignored issues
show
Bug introduced by
There is no parameter named $id. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
37
     * @return \Illuminate\Http\JsonResponse
38
     */
39
    public function show($campaign)
40
    {
41
42
       return new CampaignResource(Campaign::find($campaign));
43
44
    }
45
46
}
47