for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace VideoGamesRecords\CoreBundle\Controller\Admin;
use Sonata\AdminBundle\Controller\CRUDController;
use Symfony\Component\HttpFoundation\RedirectResponse;
use VideoGamesRecords\CoreBundle\Ranking\Command\Player\PlayerSerieRankingHandler;
/**
* Class GameAdminController
*/
class SerieAdminController extends CRUDController
{
private PlayerSerieRankingHandler $rankingHandler;
public function __construct(PlayerSerieRankingHandler $rankingHandler)
$this->rankingHandler = $rankingHandler;
}
* @param $id
* @return RedirectResponse
public function majAction($id): RedirectResponse
$id
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function majAction(/** @scrutinizer ignore-unused */ $id): RedirectResponse
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$this->rankingHandler->handle($this->admin->getSubject()->getId());
$this->addFlash('sonata_flash_success', 'Serie maj successfully');
return new RedirectResponse($this->admin->generateUrl('list'));
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.