for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Folk\Controllers;
use Zend\Diactoros\Response\RedirectResponse;
use Psr7Middlewares\Middleware\ErrorHandler;
class Index
{
public function index($request, $response, $app)
$request
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$response
__construct()
return $app['templates']->render('pages/index');
}
public function entity($request, $response, $app)
$entity = $request->getAttribute('entity');
return new RedirectResponse($app->getRouteUrl('list', [
'entity' => $entity,
]));
public function error($request, $response, $app)
$error = ErrorHandler::getException($request);
return $app['templates']->render('pages/error', ['error' => $error]);
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.