← All changes
|
vendor/psr/http-message/src/ServerRequestInterface.php
+11
-13
5.7.2
→
6.3.0
View file →
| @@ -1,8 +1,6 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); | |
| 4 | - | |
| 5 | 3 | namespace Psr\Http\Message; |
| 6 | 4 | |
| 7 | 5 | /** |
| 8 | 6 | * Representation of an incoming, server-side HTTP request. |
| @@ -52,9 +50,9 @@ | ||
| 52 | 50 | * REQUIRED to originate from $_SERVER. |
| 53 | 51 | * |
| 54 | 52 | * @return array |
| 55 | 53 | */ |
| 56 | - public function getServerParams(); | |
| 54 | + public function getServerParams(): array; | |
| 57 | 55 | |
| 58 | 56 | /** |
| 59 | 57 | * Retrieve cookies. |
| 60 | 58 | * |
| @@ -64,9 +62,9 @@ | ||
| 64 | 62 | * superglobal. |
| 65 | 63 | * |
| 66 | 64 | * @return array |
| 67 | 65 | */ |
| 68 | - public function getCookieParams(); | |
| 66 | + public function getCookieParams(): array; | |
| 69 | 67 | |
| 70 | 68 | /** |
| 71 | 69 | * Return an instance with the specified cookies. |
| 72 | 70 | * |
| @@ -83,9 +81,9 @@ | ||
| 83 | 81 | * |
| 84 | 82 | * @param array $cookies Array of key/value pairs representing cookies. |
| 85 | 83 | * @return static |
| 86 | 84 | */ |
| 87 | - public function withCookieParams(array $cookies); | |
| 85 | + public function withCookieParams(array $cookies): ServerRequestInterface; | |
| 88 | 86 | |
| 89 | 87 | /** |
| 90 | 88 | * Retrieve query string arguments. |
| 91 | 89 | * |
| @@ -97,9 +95,9 @@ | ||
| 97 | 95 | * or from the `QUERY_STRING` server param. |
| 98 | 96 | * |
| 99 | 97 | * @return array |
| 100 | 98 | */ |
| 101 | - public function getQueryParams(); | |
| 99 | + public function getQueryParams(): array; | |
| 102 | 100 | |
| 103 | 101 | /** |
| 104 | 102 | * Return an instance with the specified query string arguments. |
| 105 | 103 | * |
| @@ -121,9 +119,9 @@ | ||
| 121 | 119 | * @param array $query Array of query string arguments, typically from |
| 122 | 120 | * $_GET. |
| 123 | 121 | * @return static |
| 124 | 122 | */ |
| 125 | - public function withQueryParams(array $query); | |
| 123 | + public function withQueryParams(array $query): ServerRequestInterface; | |
| 126 | 124 | |
| 127 | 125 | /** |
| 128 | 126 | * Retrieve normalized file upload data. |
| 129 | 127 | * |
| @@ -135,9 +133,9 @@ | ||
| 135 | 133 | * |
| 136 | 134 | * @return array An array tree of UploadedFileInterface instances; an empty |
| 137 | 135 | * array MUST be returned if no data is present. |
| 138 | 136 | */ |
| 139 | - public function getUploadedFiles(); | |
| 137 | + public function getUploadedFiles(): array; | |
| 140 | 138 | |
| 141 | 139 | /** |
| 142 | 140 | * Create a new instance with the specified uploaded files. |
| 143 | 141 | * |
| @@ -148,9 +146,9 @@ | ||
| 148 | 146 | * @param array $uploadedFiles An array tree of UploadedFileInterface instances. |
| 149 | 147 | * @return static |
| 150 | 148 | * @throws \InvalidArgumentException if an invalid structure is provided. |
| 151 | 149 | */ |
| 152 | - public function withUploadedFiles(array $uploadedFiles); | |
| 150 | + public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface; | |
| 153 | 151 | |
| 154 | 152 | /** |
| 155 | 153 | * Retrieve any parameters provided in the request body. |
| 156 | 154 | * |
| @@ -195,9 +193,9 @@ | ||
| 195 | 193 | * @return static |
| 196 | 194 | * @throws \InvalidArgumentException if an unsupported argument type is |
| 197 | 195 | * provided. |
| 198 | 196 | */ |
| 199 | - public function withParsedBody($data); | |
| 197 | + public function withParsedBody($data): ServerRequestInterface; | |
| 200 | 198 | |
| 201 | 199 | /** |
| 202 | 200 | * Retrieve attributes derived from the request. |
| 203 | 201 | * |
| @@ -208,9 +206,9 @@ | ||
| 208 | 206 | * will be application and request specific, and CAN be mutable. |
| 209 | 207 | * |
| 210 | 208 | * @return array Attributes derived from the request. |
| 211 | 209 | */ |
| 212 | - public function getAttributes(); | |
| 210 | + public function getAttributes(): array; | |
| 213 | 211 | |
| 214 | 212 | /** |
| 215 | 213 | * Retrieve a single derived request attribute. |
| 216 | 214 | * |
| @@ -242,9 +240,9 @@ | ||
| 242 | 240 | * @param string $name The attribute name. |
| 243 | 241 | * @param mixed $value The value of the attribute. |
| 244 | 242 | * @return static |
| 245 | 243 | */ |
| 246 | - public function withAttribute(string $name, $value); | |
| 244 | + public function withAttribute(string $name, $value): ServerRequestInterface; | |
| 247 | 245 | |
| 248 | 246 | /** |
| 249 | 247 | * Return an instance that removes the specified derived request attribute. |
| 250 | 248 | * |
| @@ -258,6 +256,6 @@ | ||
| 258 | 256 | * @see getAttributes() |
| 259 | 257 | * @param string $name The attribute name. |
| 260 | 258 | * @return static |
| 261 | 259 | */ |
| 262 | - public function withoutAttribute(string $name); | |
| 260 | + public function withoutAttribute(string $name): ServerRequestInterface; | |
| 263 | 261 | } |