rudolfcms /
rudolf
This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Rudolf\Component\Http; |
||
| 4 | |||
| 5 | class ResponseMessages |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Returns http code description. |
||
| 9 | * |
||
| 10 | * @param int $code |
||
| 11 | * |
||
| 12 | * @return array|bool |
||
| 13 | */ |
||
| 14 | public static function getMessages($code) |
||
| 15 | { |
||
| 16 | switch ($code) { |
||
| 17 | case 100: return [ |
||
| 18 | _('Continue'), |
||
| 19 | _('The request has been completed and the rest of the process can continue.'), |
||
| 20 | ]; break; |
||
|
0 ignored issues
–
show
|
|||
| 21 | case 101: return [ |
||
| 22 | _('Switching Protocols'), |
||
| 23 | _('When requesting a page, a browser might receive a statis code of 101, followed by an "Upgrade" header showing that the server is changing to a different version of HTTP.'), |
||
| 24 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 25 | case 200: return [ |
||
| 26 | _('OK'), |
||
| 27 | _('Standard response for HTTP successful requests.'), |
||
| 28 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 29 | case 201: return [ |
||
| 30 | _('Created'), |
||
| 31 | _('When new pages are created by posted form data or by a CGI process, this is confirmation that it worked.'), |
||
| 32 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 33 | case 202: return [ |
||
| 34 | _('Accepted'), |
||
| 35 | _('The client\'s request was accepted, though not yet processed.'), |
||
| 36 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 37 | case 203: return [ |
||
| 38 | _('Non-Authoritative Information'), |
||
| 39 | _('The information contained in the entity header is not from the original site, but from a third party server.'), |
||
| 40 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 41 | case 204: return [ |
||
| 42 | _('No Content'), |
||
| 43 | _('If you click a link which has no target URL, this response is elicited by the server. It\'s silent and doesn\'t warn the user about anything.'), |
||
| 44 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 45 | case 205: return [ |
||
| 46 | _('Reset Content'), |
||
| 47 | _('This allows the server to reset any content returned by a CGI.'), |
||
| 48 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 49 | case 206: return [ |
||
| 50 | _('Partial Content'), |
||
| 51 | _('The requested file wasn\'t downloaded entirely. This is returned when the user presses the stop button before a page is loaded, for example.'), |
||
| 52 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 53 | case 300: return [ |
||
| 54 | _('Multiple Choices'), |
||
| 55 | _('The requested address refers to more than one file. Depending on how the server is configured, you get an error or a choice of which page you want.'), |
||
| 56 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 57 | case 301: return [ |
||
| 58 | _('Moved Permanently'), |
||
| 59 | _('If the server is set up properly it will automatically redirect the reader to the new location of the file.'), |
||
| 60 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 61 | case 302: return [ |
||
| 62 | _('Moved Temporarily'), |
||
| 63 | _('Page has been moved temporarily, and the new URL is available. You should be sent there by the server.'), |
||
| 64 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 65 | case 303: return [ |
||
| 66 | _('See Other'), |
||
| 67 | _('This is a "see other" SRC. Data is somewhere else and the GET method is used to retrieve it.'), |
||
| 68 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 69 | case 304: return [ |
||
| 70 | _('Not Modified'), |
||
| 71 | _('If the request header includes an \'if modified since\' parameter, this code will be returned if the file has not changed since that date. Search engine robots may generate a lot of these.'), |
||
| 72 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 73 | case 305: return [ |
||
| 74 | _('Use Proxy'), |
||
| 75 | _('The recipient is expected to repeat the request via the proxy.'), |
||
| 76 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 77 | case 400: return [ |
||
| 78 | _('Bad Request'), |
||
| 79 | _('There is a syntax error in the request, and it is denied.'), |
||
| 80 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 81 | case 401: return [ |
||
| 82 | _('Unauthorized'), |
||
| 83 | _('The request header did not contain the necessary authentication codes, and the client is denied access.'), |
||
| 84 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 85 | case 402: return [ |
||
| 86 | _('Payment Required'), |
||
| 87 | _('Payment is required. This code is not yet in operation.'), |
||
| 88 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 89 | case 403: return [ |
||
| 90 | _('Forbidden'), |
||
| 91 | _('The client is not allowed to see a certain file. This is also returned at times when the server doesn\'t want any more visitors.'), |
||
| 92 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 93 | case 404: return [ |
||
| 94 | _('Not Found'), |
||
| 95 | _('The requested file was not found on the server. Possibly because it was deleted, or never existed before. Often caused by misspellings of URLs.'), |
||
| 96 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 97 | case 405: return [ |
||
| 98 | _('Method Not Allowed'), |
||
| 99 | _('The method you are using to access the file is not allowed.'), |
||
| 100 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 101 | case 406: return [ |
||
| 102 | _('Not Acceptable'), |
||
| 103 | _('The requested file exists but cannot be used as the client system doesn\'t understand the format the file is configured for.'), |
||
| 104 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 105 | case 407: return [ |
||
| 106 | _('Proxy Authentication Required'), |
||
| 107 | _('The request must be authorised before it can take place.'), |
||
| 108 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 109 | case 408: return [ |
||
| 110 | _('Request Time-out'), |
||
| 111 | _('The server took longer than its allowed time to process the request. Often caused by heavy net traffic.'), |
||
| 112 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 113 | case 409: return [ |
||
| 114 | _('Conflict'), |
||
| 115 | _('Too many concurrent requests for a single file.'), |
||
| 116 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 117 | case 410: return [ |
||
| 118 | _('Gone'), |
||
| 119 | _('The file used to be in this position, but is there no longer.'), |
||
| 120 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 121 | case 411: return [ |
||
| 122 | _('Length Required'), |
||
| 123 | _('The request is missing its Content-Length header.'), |
||
| 124 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 125 | case 412: return [ |
||
| 126 | _('Precondition Failed'), |
||
| 127 | _('A certain configuration is required for this file to be delivered, but the client has not set this up.'), |
||
| 128 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 129 | case 413: return [ |
||
| 130 | _('Request Entity Too Large'), |
||
| 131 | _('The requested file was too big to process.'), |
||
| 132 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 133 | case 414: return [ |
||
| 134 | _('Request-URI Too Large'), |
||
| 135 | _('The address you entered was overly long for the server.'), |
||
| 136 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 137 | case 415: return [ |
||
| 138 | _('Unsupported Media Type'), |
||
| 139 | _('The filetype of the request is unsupported.'), |
||
| 140 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 141 | case 500: return [ |
||
| 142 | _('Internal Server Error'), |
||
| 143 | _('The server encountered an unexpected condition which prevented it from fulfilling the request.'), |
||
| 144 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 145 | case 501: return [ |
||
| 146 | _('Not Implemented'), |
||
| 147 | _('The server does not support the facility required.'), |
||
| 148 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 149 | case 502: return [ |
||
| 150 | _('Bad Gateway'), |
||
| 151 | _('The server you\'re trying to reach is sending back errors.'), |
||
| 152 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 153 | case 503: return [ |
||
| 154 | _('Service Unavailable'), |
||
| 155 | _('The service or file that is being requested is not currently available.'), |
||
| 156 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 157 | case 504: return [ |
||
| 158 | _('Gateway Time-out'), |
||
| 159 | _('The gateway has timed out. Like the 408 timeout error, but this one occurs at the gateway of the server.'), |
||
| 160 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 161 | case 505: return [ |
||
| 162 | _('HTTP Version not supported'), |
||
| 163 | _('The HTTP protocol you are asking for is not supported.'), |
||
| 164 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 165 | |||
| 166 | default: return [ |
||
| 167 | _('Service Unavailable'), |
||
| 168 | _('The service or file that is being requested is not currently available.'), |
||
| 169 | ]; break; |
||
|
0 ignored issues
–
show
break is not strictly necessary here and could be removed.
The break statement is not necessary if it is preceded for example by a return statement: switch ($x) {
case 1:
return 'foo';
break; // This break is not necessary and can be left off.
}
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive. Loading history...
|
|||
| 170 | } |
||
| 171 | } |
||
| 172 | } |
||
| 173 |
The break statement is not necessary if it is preceded for example by a return statement:
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.