for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Http\Controllers\Api;
use App\Association;
use App\Club;
use App\Federation;
class AdministrativeStructureController extends ApiController
{
public static function getFederations()
return Federation::orderBy('id', 'asc')->get(['id as value', 'name as text'])->toArray();
}
public static function getAssociations($federationId)
return Association::where('federation_id', $federationId)->orderBy('id', 'asc')->get(['id as value', 'name as text'])->toArray();
public static function getClubs($federationId, $associationId)
$federationId
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public static function getClubs(/** @scrutinizer ignore-unused */ $federationId, $associationId)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return Club::where('association_id', $associationId)
->get(['id as value', 'name as text'])->toArray();
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.