for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Nip\Dispatcher\Commands;
use Nip\Dispatcher\Exceptions\ForwardException;
use Psr\Http\Message\ServerRequestInterface;
/**
* Class CommandFactory
* @package Nip\Dispatcher\Commands
*/
class CommandFactory
{
* @param $action
* @return Command
public static function createFromAction($action): Command
$command = new Command();
$command->setAction($action);
return $command;
}
* @param ServerRequestInterface|null $request
public static function createFromRequest(ServerRequestInterface $request): Command
$command->setRequest($request);
* @param ForwardException $exception
public static function createFromForwardException(ForwardException $exception)
$exception
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public static function createFromForwardException(/** @scrutinizer ignore-unused */ ForwardException $exception)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.