for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PhpDraft\Controllers\Admin;
use \Silex\Application;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use PhpDraft\Domain\Models\PhpDraftResponse;
use PhpDraft\Domain\Entities\Draft;
class ProPlayerController
{
public function GetSports(Application $app, Request $request) {
$request
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function GetSports(Application $app, /** @scrutinizer ignore-unused */ Request $request) {
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$sports = $app['phpdraft.DraftDataRepository']->GetSports();
return $app->json($sports, Response::HTTP_OK);
}
public function Upload(Application $app, Request $request) {
$sport = $request->get('sport');
$file = $request->files->get('file');
$validity = $app['phpdraft.ProPlayerValidator']->IsUploadSportValid($sport, $file);
if (!$validity->success) {
return $app->json($validity, $validity->responseType());
$response = $app['phpdraft.ProPlayerService']->Upload($sport, $file);
return $app->json($response, $response->responseType());
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.