for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Folk\Controllers;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use Folk\Admin;
class ReadEntity extends Entity
{
public function html(Request $request, Response $response, Admin $app, $entityName)
$response
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$id = $request->getAttribute('id');
$form = static::createForm($app, $entityName, $id);
$form['data']->val($app->getEntity($entityName)->read($id));
//Render template
return $app['templates']->render('pages/read', [
'entityName' => $entityName,
'form' => $form,
'id' => $id,
]);
}
public function json(Request $request, Response $response, Admin $app, $entityName)
return json_encode($app->getEntity($entityName)->read($id));
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.