for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Application\Business\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Xervice\Controller\Business\Controller\AbstractController;
use Xervice\Core\Factory\FactoryInterface;
/**
* @method \App\Application\ApplicationFactory getFactory()
*/
class IndexController extends AbstractController
{
public function indexAction(): Response
return $this->sendResponse(
sprintf(
'Hello World %s',
$this->getFactory()->getSessionClient()->get('name') ?: 'undefined'
)
);
}
* @param \Symfony\Component\HttpFoundation\Request $request
* @param string $name
*
* @return \Symfony\Component\HttpFoundation\Response
* @throws \Core\Locator\Dynamic\ServiceNotParseable
public function nameAction(Request $request, string $name): Response
$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 nameAction(/** @scrutinizer ignore-unused */ Request $request, string $name): Response
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$this->getFactory()->getSessionClient()->set('name', $name);
'Set name %s',
$name
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.