← All changes
|
includes/sdk/s3/Psr/Http/Message/ServerRequestInterface.php
+12
-12
1.2.6
→
1.4.1
View file →
| @@ -50,9 +50,9 @@ | ||
| 50 | 50 | * REQUIRED to originate from $_SERVER. |
| 51 | 51 | * |
| 52 | 52 | * @return array |
| 53 | 53 | */ |
| 54 | - public function getServerParams(); | |
| 54 | + public function getServerParams() : array; | |
| 55 | 55 | /** |
| 56 | 56 | * Retrieve cookies. |
| 57 | 57 | * |
| 58 | 58 | * Retrieves cookies sent by the client to the server. |
| @@ -61,9 +61,9 @@ | ||
| 61 | 61 | * superglobal. |
| 62 | 62 | * |
| 63 | 63 | * @return array |
| 64 | 64 | */ |
| 65 | - public function getCookieParams(); | |
| 65 | + public function getCookieParams() : array; | |
| 66 | 66 | /** |
| 67 | 67 | * Return an instance with the specified cookies. |
| 68 | 68 | * |
| 69 | 69 | * The data IS NOT REQUIRED to come from the $_COOKIE superglobal, but MUST |
| @@ -79,9 +79,9 @@ | ||
| 79 | 79 | * |
| 80 | 80 | * @param array $cookies Array of key/value pairs representing cookies. |
| 81 | 81 | * @return static |
| 82 | 82 | */ |
| 83 | - public function withCookieParams(array $cookies); | |
| 83 | + public function withCookieParams(array $cookies) : ServerRequestInterface; | |
| 84 | 84 | /** |
| 85 | 85 | * Retrieve query string arguments. |
| 86 | 86 | * |
| 87 | 87 | * Retrieves the deserialized query string arguments, if any. |
| @@ -92,9 +92,9 @@ | ||
| 92 | 92 | * or from the `QUERY_STRING` server param. |
| 93 | 93 | * |
| 94 | 94 | * @return array |
| 95 | 95 | */ |
| 96 | - public function getQueryParams(); | |
| 96 | + public function getQueryParams() : array; | |
| 97 | 97 | /** |
| 98 | 98 | * Return an instance with the specified query string arguments. |
| 99 | 99 | * |
| 100 | 100 | * These values SHOULD remain immutable over the course of the incoming |
| @@ -115,9 +115,9 @@ | ||
| 115 | 115 | * @param array $query Array of query string arguments, typically from |
| 116 | 116 | * $_GET. |
| 117 | 117 | * @return static |
| 118 | 118 | */ |
| 119 | - public function withQueryParams(array $query); | |
| 119 | + public function withQueryParams(array $query) : ServerRequestInterface; | |
| 120 | 120 | /** |
| 121 | 121 | * Retrieve normalized file upload data. |
| 122 | 122 | * |
| 123 | 123 | * This method returns upload metadata in a normalized tree, with each leaf |
| @@ -128,9 +128,9 @@ | ||
| 128 | 128 | * |
| 129 | 129 | * @return array An array tree of UploadedFileInterface instances; an empty |
| 130 | 130 | * array MUST be returned if no data is present. |
| 131 | 131 | */ |
| 132 | - public function getUploadedFiles(); | |
| 132 | + public function getUploadedFiles() : array; | |
| 133 | 133 | /** |
| 134 | 134 | * Create a new instance with the specified uploaded files. |
| 135 | 135 | * |
| 136 | 136 | * This method MUST be implemented in such a way as to retain the |
| @@ -140,9 +140,9 @@ | ||
| 140 | 140 | * @param array $uploadedFiles An array tree of UploadedFileInterface instances. |
| 141 | 141 | * @return static |
| 142 | 142 | * @throws \InvalidArgumentException if an invalid structure is provided. |
| 143 | 143 | */ |
| 144 | - public function withUploadedFiles(array $uploadedFiles); | |
| 144 | + public function withUploadedFiles(array $uploadedFiles) : ServerRequestInterface; | |
| 145 | 145 | /** |
| 146 | 146 | * Retrieve any parameters provided in the request body. |
| 147 | 147 | * |
| 148 | 148 | * If the request Content-Type is either application/x-www-form-urlencoded |
| @@ -185,9 +185,9 @@ | ||
| 185 | 185 | * @return static |
| 186 | 186 | * @throws \InvalidArgumentException if an unsupported argument type is |
| 187 | 187 | * provided. |
| 188 | 188 | */ |
| 189 | - public function withParsedBody($data); | |
| 189 | + public function withParsedBody($data) : ServerRequestInterface; | |
| 190 | 190 | /** |
| 191 | 191 | * Retrieve attributes derived from the request. |
| 192 | 192 | * |
| 193 | 193 | * The request "attributes" may be used to allow injection of any |
| @@ -197,9 +197,9 @@ | ||
| 197 | 197 | * will be application and request specific, and CAN be mutable. |
| 198 | 198 | * |
| 199 | 199 | * @return array Attributes derived from the request. |
| 200 | 200 | */ |
| 201 | - public function getAttributes(); | |
| 201 | + public function getAttributes() : array; | |
| 202 | 202 | /** |
| 203 | 203 | * Retrieve a single derived request attribute. |
| 204 | 204 | * |
| 205 | 205 | * Retrieves a single derived request attribute as described in |
| @@ -213,9 +213,9 @@ | ||
| 213 | 213 | * @param string $name The attribute name. |
| 214 | 214 | * @param mixed $default Default value to return if the attribute does not exist. |
| 215 | 215 | * @return mixed |
| 216 | 216 | */ |
| 217 | - public function getAttribute($name, $default = null); | |
| 217 | + public function getAttribute(string $name, $default = null); | |
| 218 | 218 | /** |
| 219 | 219 | * Return an instance with the specified derived request attribute. |
| 220 | 220 | * |
| 221 | 221 | * This method allows setting a single derived request attribute as |
| @@ -229,9 +229,9 @@ | ||
| 229 | 229 | * @param string $name The attribute name. |
| 230 | 230 | * @param mixed $value The value of the attribute. |
| 231 | 231 | * @return static |
| 232 | 232 | */ |
| 233 | - public function withAttribute($name, $value); | |
| 233 | + public function withAttribute(string $name, $value) : ServerRequestInterface; | |
| 234 | 234 | /** |
| 235 | 235 | * Return an instance that removes the specified derived request attribute. |
| 236 | 236 | * |
| 237 | 237 | * This method allows removing a single derived request attribute as |
| @@ -244,6 +244,6 @@ | ||
| 244 | 244 | * @see getAttributes() |
| 245 | 245 | * @param string $name The attribute name. |
| 246 | 246 | * @return static |
| 247 | 247 | */ |
| 248 | - public function withoutAttribute($name); | |
| 248 | + public function withoutAttribute(string $name) : ServerRequestInterface; | |
| 249 | 249 | } |