for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Gvera\Controllers;
use Gvera\Helpers\dependencyInjection\DIContainer;
use Gvera\Helpers\http\JSONResponse;
use Gvera\Helpers\http\Response;
use Throwable;
class Doc extends GvController
{
public function index()
try {
$this->mustPassBasicAuthentication();
} catch (Throwable $e) {
$this->httpResponse->response(
new JSONResponse(
['message' => $e->getMessage()],
Response::HTTP_RESPONSE_UNAUTHORIZED,
Response::BASIC_AUTH_ACCESS_DENIED
)
);
exit;
exit
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.
}
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.