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\Handler\Video\YoutubeDataHandler;
/**
* Class VideoAdminController
*/
class VideoAdminController extends CRUDController
{
private YoutubeDataHandler $youtubeDataHandler;
public function __construct(YoutubeDataHandler $youtubeDataHandler)
$this->youtubeDataHandler = $youtubeDataHandler;
}
* @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->youtubeDataHandler->process($this->admin->getSubject());
$this->addFlash('sonata_flash_success', 'Video data 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.