← All changes
|
vendor_prefixed/psr/http-message/src/UriInterface.php
+16
-16
18.0
→
trunk
View file →
| @@ -37,9 +37,9 @@ | ||
| 37 | 37 | * |
| 38 | 38 | * @see https://tools.ietf.org/html/rfc3986#section-3.1 |
| 39 | 39 | * @return string The URI scheme. |
| 40 | 40 | */ |
| 41 | - public function getScheme(); | |
| 41 | + public function getScheme() : string; | |
| 42 | 42 | /** |
| 43 | 43 | * Retrieve the authority component of the URI. |
| 44 | 44 | * |
| 45 | 45 | * If no authority information is present, this method MUST return an empty |
| @@ -56,9 +56,9 @@ | ||
| 56 | 56 | * |
| 57 | 57 | * @see https://tools.ietf.org/html/rfc3986#section-3.2 |
| 58 | 58 | * @return string The URI authority, in "[user-info@]host[:port]" format. |
| 59 | 59 | */ |
| 60 | - public function getAuthority(); | |
| 60 | + public function getAuthority() : string; | |
| 61 | 61 | /** |
| 62 | 62 | * Retrieve the user information component of the URI. |
| 63 | 63 | * |
| 64 | 64 | * If no user information is present, this method MUST return an empty |
| @@ -72,9 +72,9 @@ | ||
| 72 | 72 | * NOT be added. |
| 73 | 73 | * |
| 74 | 74 | * @return string The URI user information, in "username[:password]" format. |
| 75 | 75 | */ |
| 76 | - public function getUserInfo(); | |
| 76 | + public function getUserInfo() : string; | |
| 77 | 77 | /** |
| 78 | 78 | * Retrieve the host component of the URI. |
| 79 | 79 | * |
| 80 | 80 | * If no host is present, this method MUST return an empty string. |
| @@ -84,9 +84,9 @@ | ||
| 84 | 84 | * |
| 85 | 85 | * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 |
| 86 | 86 | * @return string The URI host. |
| 87 | 87 | */ |
| 88 | - public function getHost(); | |
| 88 | + public function getHost() : string; | |
| 89 | 89 | /** |
| 90 | 90 | * Retrieve the port component of the URI. |
| 91 | 91 | * |
| 92 | 92 | * If a port is present, and it is non-standard for the current scheme, |
| @@ -100,9 +100,9 @@ | ||
| 100 | 100 | * the standard port for that scheme, but SHOULD return null. |
| 101 | 101 | * |
| 102 | 102 | * @return null|int The URI port. |
| 103 | 103 | */ |
| 104 | - public function getPort(); | |
| 104 | + public function getPort() : ?int; | |
| 105 | 105 | /** |
| 106 | 106 | * Retrieve the path component of the URI. |
| 107 | 107 | * |
| 108 | 108 | * The path can either be empty or absolute (starting with a slash) or |
| @@ -126,9 +126,9 @@ | ||
| 126 | 126 | * @see https://tools.ietf.org/html/rfc3986#section-2 |
| 127 | 127 | * @see https://tools.ietf.org/html/rfc3986#section-3.3 |
| 128 | 128 | * @return string The URI path. |
| 129 | 129 | */ |
| 130 | - public function getPath(); | |
| 130 | + public function getPath() : string; | |
| 131 | 131 | /** |
| 132 | 132 | * Retrieve the query string of the URI. |
| 133 | 133 | * |
| 134 | 134 | * If no query string is present, this method MUST return an empty string. |
| @@ -147,9 +147,9 @@ | ||
| 147 | 147 | * @see https://tools.ietf.org/html/rfc3986#section-2 |
| 148 | 148 | * @see https://tools.ietf.org/html/rfc3986#section-3.4 |
| 149 | 149 | * @return string The URI query string. |
| 150 | 150 | */ |
| 151 | - public function getQuery(); | |
| 151 | + public function getQuery() : string; | |
| 152 | 152 | /** |
| 153 | 153 | * Retrieve the fragment component of the URI. |
| 154 | 154 | * |
| 155 | 155 | * If no fragment is present, this method MUST return an empty string. |
| @@ -164,9 +164,9 @@ | ||
| 164 | 164 | * @see https://tools.ietf.org/html/rfc3986#section-2 |
| 165 | 165 | * @see https://tools.ietf.org/html/rfc3986#section-3.5 |
| 166 | 166 | * @return string The URI fragment. |
| 167 | 167 | */ |
| 168 | - public function getFragment(); | |
| 168 | + public function getFragment() : string; | |
| 169 | 169 | /** |
| 170 | 170 | * Return an instance with the specified scheme. |
| 171 | 171 | * |
| 172 | 172 | * This method MUST retain the state of the current instance, and return |
| @@ -180,9 +180,9 @@ | ||
| 180 | 180 | * @param string $scheme The scheme to use with the new instance. |
| 181 | 181 | * @return static A new instance with the specified scheme. |
| 182 | 182 | * @throws \InvalidArgumentException for invalid or unsupported schemes. |
| 183 | 183 | */ |
| 184 | - public function withScheme($scheme); | |
| 184 | + public function withScheme(string $scheme) : \YoastSEO_Vendor\Psr\Http\Message\UriInterface; | |
| 185 | 185 | /** |
| 186 | 186 | * Return an instance with the specified user information. |
| 187 | 187 | * |
| 188 | 188 | * This method MUST retain the state of the current instance, and return |
| @@ -195,9 +195,9 @@ | ||
| 195 | 195 | * @param string $user The user name to use for authority. |
| 196 | 196 | * @param null|string $password The password associated with $user. |
| 197 | 197 | * @return static A new instance with the specified user information. |
| 198 | 198 | */ |
| 199 | - public function withUserInfo($user, $password = null); | |
| 199 | + public function withUserInfo(string $user, ?string $password = null) : \YoastSEO_Vendor\Psr\Http\Message\UriInterface; | |
| 200 | 200 | /** |
| 201 | 201 | * Return an instance with the specified host. |
| 202 | 202 | * |
| 203 | 203 | * This method MUST retain the state of the current instance, and return |
| @@ -208,9 +208,9 @@ | ||
| 208 | 208 | * @param string $host The hostname to use with the new instance. |
| 209 | 209 | * @return static A new instance with the specified host. |
| 210 | 210 | * @throws \InvalidArgumentException for invalid hostnames. |
| 211 | 211 | */ |
| 212 | - public function withHost($host); | |
| 212 | + public function withHost(string $host) : \YoastSEO_Vendor\Psr\Http\Message\UriInterface; | |
| 213 | 213 | /** |
| 214 | 214 | * Return an instance with the specified port. |
| 215 | 215 | * |
| 216 | 216 | * This method MUST retain the state of the current instance, and return |
| @@ -226,9 +226,9 @@ | ||
| 226 | 226 | * removes the port information. |
| 227 | 227 | * @return static A new instance with the specified port. |
| 228 | 228 | * @throws \InvalidArgumentException for invalid ports. |
| 229 | 229 | */ |
| 230 | - public function withPort($port); | |
| 230 | + public function withPort(?int $port) : \YoastSEO_Vendor\Psr\Http\Message\UriInterface; | |
| 231 | 231 | /** |
| 232 | 232 | * Return an instance with the specified path. |
| 233 | 233 | * |
| 234 | 234 | * This method MUST retain the state of the current instance, and return |
| @@ -249,9 +249,9 @@ | ||
| 249 | 249 | * @param string $path The path to use with the new instance. |
| 250 | 250 | * @return static A new instance with the specified path. |
| 251 | 251 | * @throws \InvalidArgumentException for invalid paths. |
| 252 | 252 | */ |
| 253 | - public function withPath($path); | |
| 253 | + public function withPath(string $path) : \YoastSEO_Vendor\Psr\Http\Message\UriInterface; | |
| 254 | 254 | /** |
| 255 | 255 | * Return an instance with the specified query string. |
| 256 | 256 | * |
| 257 | 257 | * This method MUST retain the state of the current instance, and return |
| @@ -265,9 +265,9 @@ | ||
| 265 | 265 | * @param string $query The query string to use with the new instance. |
| 266 | 266 | * @return static A new instance with the specified query string. |
| 267 | 267 | * @throws \InvalidArgumentException for invalid query strings. |
| 268 | 268 | */ |
| 269 | - public function withQuery($query); | |
| 269 | + public function withQuery(string $query) : \YoastSEO_Vendor\Psr\Http\Message\UriInterface; | |
| 270 | 270 | /** |
| 271 | 271 | * Return an instance with the specified URI fragment. |
| 272 | 272 | * |
| 273 | 273 | * This method MUST retain the state of the current instance, and return |
| @@ -280,9 +280,9 @@ | ||
| 280 | 280 | * |
| 281 | 281 | * @param string $fragment The fragment to use with the new instance. |
| 282 | 282 | * @return static A new instance with the specified fragment. |
| 283 | 283 | */ |
| 284 | - public function withFragment($fragment); | |
| 284 | + public function withFragment(string $fragment) : \YoastSEO_Vendor\Psr\Http\Message\UriInterface; | |
| 285 | 285 | /** |
| 286 | 286 | * Return the string representation as a URI reference. |
| 287 | 287 | * |
| 288 | 288 | * Depending on which components of the URI are present, the resulting |
| @@ -304,6 +304,6 @@ | ||
| 304 | 304 | * |
| 305 | 305 | * @see http://tools.ietf.org/html/rfc3986#section-4.1 |
| 306 | 306 | * @return string |
| 307 | 307 | */ |
| 308 | - public function __toString(); | |
| 308 | + public function __toString() : string; | |
| 309 | 309 | } |