for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Linio\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
abstract class RestController
{
/**
* @param string $message
* @param int $status
*
* @return JsonResponse
*/
public function abort($message = '', $status = 500)
return new JsonResponse(['error' => ['message' => empty($message) ? 'Internal error' : $message]], $status);
}