Skip to content

Commit fa41d3d

Browse files
authored
Add HTTP Unprocessable Content (#106)
1 parent ff5c8cb commit fa41d3d

File tree

2 files changed

+74
-72
lines changed

2 files changed

+74
-72
lines changed

src/Objects/Http/HttpStatusCode.php

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,42 @@
55
/** @codeCoverageIgnore */
66
class HttpStatusCode
77
{
8-
const OK = 200;
9-
const CREATED = 201;
10-
const ACCEPTED = 202;
11-
const NO_CONTENT = 204;
12-
const MULTIPLE_CHOICES = 300;
13-
const MOVED_PERMANENTLY = 301;
14-
const FOUND = 302;
15-
const PERMANENT_REDIRECT = 301;
16-
const TEMPORARY_REDIRECT = 302;
17-
const SEE_OTHER = 303;
18-
const NOT_MODIFIED = 304;
19-
const PERMANENT_REDIRECT_REAL = 307;
20-
const TEMPORARY_REDIRECT_REAL = 308;
21-
const BAD_REQUEST = 400;
22-
const UNAUTHORIZED = 401;
23-
const PAYMENT_REQUIRED = 402;
24-
const NOT_LICENSED = 402;
25-
const FORBIDDEN = 403;
26-
const NOT_FOUND = 404;
27-
const METHOD_NOT_ALLOWED = 405;
28-
const NOT_ACCEPTABLE = 406;
29-
const REQUEST_TIMEOUT = 408;
30-
const CONFLICT = 409;
31-
const GONE = 410;
32-
const PRECONDITION_FAILED = 412;
33-
const PAYLOAD_TOO_LARGE = 413;
34-
const UNSUPPORTED_MEDIA_TYPE = 415;
35-
const PRECONDITION_REQUIRED = 428;
36-
const TOO_MANY_REQUESTS = 429;
37-
const UNAVAILABLE_FOR_LEGAL_REASONS = 451;
38-
const INTERNAL_SERVER_ERROR = 500;
39-
const NOT_IMPLEMENTED = 501;
40-
const BAD_GATEWAY = 502;
41-
const SERVICE_UNAVAILABLE = 503;
42-
const GATEWAY_TIMEOUT = 504;
43-
const INSUFFICIENT_STORAGE = 507;
44-
const NETWORK_AUTHENTICATION_REQUIRED = 511;
8+
public const int OK = 200;
9+
public const int CREATED = 201;
10+
public const int ACCEPTED = 202;
11+
public const int NO_CONTENT = 204;
12+
public const int MULTIPLE_CHOICES = 300;
13+
public const int MOVED_PERMANENTLY = 301;
14+
public const int FOUND = 302;
15+
public const int PERMANENT_REDIRECT = 301;
16+
public const int TEMPORARY_REDIRECT = 302;
17+
public const int SEE_OTHER = 303;
18+
public const int NOT_MODIFIED = 304;
19+
public const int PERMANENT_REDIRECT_REAL = 307;
20+
public const int TEMPORARY_REDIRECT_REAL = 308;
21+
public const int BAD_REQUEST = 400;
22+
public const int UNAUTHORIZED = 401;
23+
public const int PAYMENT_REQUIRED = 402;
24+
public const int NOT_LICENSED = 402;
25+
public const int FORBIDDEN = 403;
26+
public const int NOT_FOUND = 404;
27+
public const int METHOD_NOT_ALLOWED = 405;
28+
public const int NOT_ACCEPTABLE = 406;
29+
public const int REQUEST_TIMEOUT = 408;
30+
public const int CONFLICT = 409;
31+
public const int GONE = 410;
32+
public const int PRECONDITION_FAILED = 412;
33+
public const int PAYLOAD_TOO_LARGE = 413;
34+
public const int UNSUPPORTED_MEDIA_TYPE = 415;
35+
public const int UNPROCESSABLE_CONTENT = 422;
36+
public const int PRECONDITION_REQUIRED = 428;
37+
public const int TOO_MANY_REQUESTS = 429;
38+
public const int UNAVAILABLE_FOR_LEGAL_REASONS = 451;
39+
public const int INTERNAL_SERVER_ERROR = 500;
40+
public const int NOT_IMPLEMENTED = 501;
41+
public const int BAD_GATEWAY = 502;
42+
public const int SERVICE_UNAVAILABLE = 503;
43+
public const int GATEWAY_TIMEOUT = 504;
44+
public const int INSUFFICIENT_STORAGE = 507;
45+
public const int NETWORK_AUTHENTICATION_REQUIRED = 511;
4546
}

src/Objects/Http/HttpStatusName.php

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,40 @@
55
/** @codeCoverageIgnore */
66
class HttpStatusName
77
{
8-
const OK = "OK";
9-
const CREATED = "Created";
10-
const ACCEPTED = "Accepted";
11-
const NO_CONTENT = "No Content";
12-
const MULTIPLE_CHOICES = "Multiple Choices";
13-
const MOVED_PERMANENTLY = "Moved Permanently";
14-
const FOUND = "Found";
15-
const PERMANENT_REDIRECT = "Permanent Redirect";
16-
const TEMPORARY_REDIRECT = "Temporary Redirect";
17-
const SEE_OTHER = "See Other";
18-
const NOT_MODIFIED = "Not Modified";
19-
const BAD_REQUEST = "Bad Request";
20-
const UNAUTHORIZED = "Unauthorized";
21-
const PAYMENT_REQUIRED = "Payment Required";
22-
const NOT_LICENSED = "Not Licensed";
23-
const FORBIDDEN = "Forbidden";
24-
const NOT_FOUND = "Not Found";
25-
const METHOD_NOT_ALLOWED = "Method Not Allowed";
26-
const NOT_ACCEPTABLE = "Not Acceptable";
27-
const REQUEST_TIMEOUT = "Request Timeout";
28-
const CONFLICT = "Conflict";
29-
const GONE = "Gone";
30-
const PRECONDITION_FAILED = "Precondition Failed";
31-
const PAYLOAD_TOO_LARGE = "Payload Too Large";
32-
const UNSUPPORTED_MEDIA_TYPE = "Unsupported Media Type";
33-
const PRECONDITION_REQUIRED = "Precondition Required";
34-
const TOO_MANY_REQUESTS = "Too Many Requests";
35-
const UNAVAILABLE_FOR_LEGAL_REASONS = "Unavailable for Legal Reasons";
36-
const INTERNAL_SERVER_ERROR = "Internal Server Error";
37-
const NOT_IMPLEMENTED = "Not Implemented";
38-
const BAD_GATEWAY = "Bad Gateway";
39-
const SERVICE_UNAVAILABLE = "Service Unavailable";
40-
const GATEWAY_TIMEOUT = "Gateway Timeout";
41-
const INSUFFICIENT_STORAGE = "Insufficient Storage";
42-
const NETWORK_AUTHENTICATION_REQUIRED = "Network Authentication Required";
8+
public const string OK = "OK";
9+
public const string CREATED = "Created";
10+
public const string ACCEPTED = "Accepted";
11+
public const string NO_CONTENT = "No Content";
12+
public const string MULTIPLE_CHOICES = "Multiple Choices";
13+
public const string MOVED_PERMANENTLY = "Moved Permanently";
14+
public const string FOUND = "Found";
15+
public const string PERMANENT_REDIRECT = "Permanent Redirect";
16+
public const string TEMPORARY_REDIRECT = "Temporary Redirect";
17+
public const string SEE_OTHER = "See Other";
18+
public const string NOT_MODIFIED = "Not Modified";
19+
public const string BAD_REQUEST = "Bad Request";
20+
public const string UNAUTHORIZED = "Unauthorized";
21+
public const string PAYMENT_REQUIRED = "Payment Required";
22+
public const string NOT_LICENSED = "Not Licensed";
23+
public const string FORBIDDEN = "Forbidden";
24+
public const string NOT_FOUND = "Not Found";
25+
public const string METHOD_NOT_ALLOWED = "Method Not Allowed";
26+
public const string NOT_ACCEPTABLE = "Not Acceptable";
27+
public const string REQUEST_TIMEOUT = "Request Timeout";
28+
public const string CONFLICT = "Conflict";
29+
public const string GONE = "Gone";
30+
public const string PRECONDITION_FAILED = "Precondition Failed";
31+
public const string PAYLOAD_TOO_LARGE = "Payload Too Large";
32+
public const string UNSUPPORTED_MEDIA_TYPE = "Unsupported Media Type";
33+
public const string UNPROCESSABLE_CONTENT = "Unprocessable Content";
34+
public const string PRECONDITION_REQUIRED = "Precondition Required";
35+
public const string TOO_MANY_REQUESTS = "Too Many Requests";
36+
public const string UNAVAILABLE_FOR_LEGAL_REASONS = "Unavailable for Legal Reasons";
37+
public const string INTERNAL_SERVER_ERROR = "Internal Server Error";
38+
public const string NOT_IMPLEMENTED = "Not Implemented";
39+
public const string BAD_GATEWAY = "Bad Gateway";
40+
public const string SERVICE_UNAVAILABLE = "Service Unavailable";
41+
public const string GATEWAY_TIMEOUT = "Gateway Timeout";
42+
public const string INSUFFICIENT_STORAGE = "Insufficient Storage";
43+
public const string NETWORK_AUTHENTICATION_REQUIRED = "Network Authentication Required";
4344
}

0 commit comments

Comments
 (0)