src/Util/StatusCodeUtil.php
Method vendorToHttp
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function vendorToHttp(Code $code = Code::OK): HttpCode
{
if (Code::OK === $code) {
return HttpCode::HTTP_OK;
}
Method httpToVendor
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function httpToVendor(HttpCode $httpCode = HttpCode::HTTP_OK): Code
{
if ($httpCode->value < 400) {
return Code::OK;
}
Avoid too many return
statements within this method. Open
Open
return HttpCode::HTTP_FORBIDDEN;
Avoid too many return
statements within this method. Open
Open
return HttpCode::HTTP_NOT_FOUND;
Avoid too many return
statements within this method. Open
Open
return HttpCode::HTTP_NOT_IMPLEMENTED;
Avoid too many return
statements within this method. Open
Open
return HttpCode::HTTP_GATEWAY_TIMEOUT;
Avoid too many return
statements within this method. Open
Open
return Code::NOT_FOUND;
Avoid too many return
statements within this method. Open
Open
return Code::PERMISSION_DENIED;
Avoid too many return
statements within this method. Open
Open
return HttpCode::HTTP_UNAUTHORIZED;
Avoid too many return
statements within this method. Open
Open
return HttpCode::HTTP_SERVICE_UNAVAILABLE;
Avoid too many return
statements within this method. Open
Open
return HttpCode::HTTP_UNPROCESSABLE_ENTITY;
Avoid too many return
statements within this method. Open
Open
return HttpCode::HTTP_PRECONDITION_FAILED;
Avoid too many return
statements within this method. Open
Open
return Code::UNAUTHENTICATED;
Avoid too many return
statements within this method. Open
Open
return Code::FAILED_PRECONDITION;
Avoid too many return
statements within this method. Open
Open
return HttpCode::HTTP_CONFLICT;
Avoid too many return
statements within this method. Open
Open
return HttpCode::HTTP_TOO_MANY_REQUESTS;
Avoid too many return
statements within this method. Open
Open
return Code::OK;
Avoid too many return
statements within this method. Open
Open
return Code::ALREADY_EXISTS;
Avoid too many return
statements within this method. Open
Open
return Code::INTERNAL;
Avoid too many return
statements within this method. Open
Open
return Code::INVALID_ARGUMENT;
Avoid too many return
statements within this method. Open
Open
return Code::RESOURCE_EXHAUSTED;
Avoid too many return
statements within this method. Open
Open
return Code::UNAVAILABLE;
Avoid too many return
statements within this method. Open
Open
return Code::UNIMPLEMENTED;