for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Install GitHub App
<?php
namespace DoeSangue\Http\Controllers\API\V1;
use DoeSangue\Http\Controllers\Controller;
use DoeSangue\Models\Campaign;
use DoeSangue\Http\Resources\Campaign as CampaignResource;
use DoeSangue\Http\Resources\CampaignCollection;
class CampaignController extends Controller
{
/**
* Initialize the class
* and set the middleware
*/
public function __construct()
$this->middleware('jwt.auth', [ 'except' => [ 'index', 'show' ] ]);
}
* Get all campaigns
* 20 queries per page
*
* @return \Illuminate\Http\JsonResponse
public function index()
return new CampaignCollection(Campaign::paginate(30));
* Get all details of a campaign
* @param integer $id
$id
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(...).
$italy
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.
public function show($campaign)
return new CampaignResource(Campaign::find($campaign));
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 methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.