Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| HttpStatus | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | /** |
| 3 | * WikiLambda utility file for error codes |
| 4 | * |
| 5 | * @file |
| 6 | * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt |
| 7 | * @license MIT |
| 8 | */ |
| 9 | |
| 10 | namespace MediaWiki\Extension\WikiLambda; |
| 11 | |
| 12 | class HttpStatus { |
| 13 | // 2xx Success |
| 14 | public const OK = 200; |
| 15 | public const CREATED = 201; |
| 16 | public const ACCEPTED = 202; |
| 17 | public const NO_CONTENT = 204; |
| 18 | |
| 19 | // 4xx Client Errors |
| 20 | public const BAD_REQUEST = 400; |
| 21 | public const UNAUTHORIZED = 401; |
| 22 | public const FORBIDDEN = 403; |
| 23 | public const NOT_FOUND = 404; |
| 24 | public const UNPROCESSABLE_ENTITY = 422; |
| 25 | public const TOO_MANY_REQUESTS = 429; |
| 26 | |
| 27 | // 5xx Server Errors |
| 28 | public const INTERNAL_SERVER_ERROR = 500; |
| 29 | public const NOT_IMPLEMENTED = 501; |
| 30 | public const BAD_GATEWAY = 502; |
| 31 | public const SERVICE_UNAVAILABLE = 503; |
| 32 | public const GATEWAY_TIMEOUT = 504; |
| 33 | } |