for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author Gerard van Helden <[email protected]>
* @copyright Zicht Online <http://zicht.nl>
*/
namespace Zicht\Bundle\UrlBundle\Controller;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
* Utility controller to reference a static ref from outside the system.
class StaticReferenceController extends Controller
{
* Redirects to the url provided by the main url provider service.
*
* @param Request $request
* @param string $name
* @param int $code
* @return \Symfony\Component\HttpFoundation\RedirectResponse
* @Route("/_static-ref/{name}")
public function redirectAction(Request $request, $name, $code = 301)
$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 redirectAction(/** @scrutinizer ignore-unused */ Request $request, $name, $code = 301)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return new RedirectResponse(
$this->get('zicht_url.provider')->url($name),
$code
);
}
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.