for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Ecodev\Felix\Action;
use Laminas\Diactoros\Response\JsonResponse;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Server\MiddlewareInterface;
abstract class AbstractAction implements MiddlewareInterface
{
/**
* @param string $message
*
* @return ResponseInterface
*/
protected function createError(string $message): ResponseInterface
$response = new JsonResponse(['error' => $message]);
return $response->withStatus(404, $message);
}