for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SeedApp\Controllers;
use Psr\Http\Message\RequestInterface;
use Slim\Http\Response;
use RedBeanPHP\R;
use SlimX\Controllers\AbstractController as AbstractXController;
use SlimX\Controllers\Action;
use SlimX\Exceptions\ErrorCodeException;
class DefaultController extends AbstractXController
{
protected $logger;
public function loadActions()
$handleWrongApi = [$this, 'handleApiVersionNotSpecified'];
$this->pushEntrypoint(new Action(
'GET',
'/',
['application/vnd.seedapp.v1+json' => [$this, 'indexAction']],
$handleWrongApi
));
}
public function handleApiVersionNotSpecified(Response $response): Response
return $this->container->get('error')->handle($response, 1000);
public function indexAction(
RequestInterface $request,
Response $response,
array $args
$args
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
/** @scrutinizer ignore-unused */ array $args
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
) {
$logger = $this->app->getContainer()->get('log');
$logger->info('indexAction init');
$response->write(json_encode(['pong']));
return $response;
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.