| @@ -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 outgoing, client-side request. |
| @@ -40,9 +38,9 @@ | ||
| 40 | 38 | * provided, this method MUST return the string "/". |
| 41 | 39 | * |
| 42 | 40 | * @return string |
| 43 | 41 | */ |
| 44 | - public function getRequestTarget(); | |
| 42 | + public function getRequestTarget(): string; | |
| 45 | 43 | |
| 46 | 44 | /** |
| 47 | 45 | * Return an instance with the specific request-target. |
| 48 | 46 | * |
| @@ -59,16 +57,17 @@ | ||
| 59 | 57 | * request-target forms allowed in request messages) |
| 60 | 58 | * @param string $requestTarget |
| 61 | 59 | * @return static |
| 62 | 60 | */ |
| 63 | - public function withRequestTarget(string $requestTarget); | |
| 61 | + public function withRequestTarget(string $requestTarget): RequestInterface; | |
| 64 | 62 | |
| 63 | + | |
| 65 | 64 | /** |
| 66 | 65 | * Retrieves the HTTP method of the request. |
| 67 | 66 | * |
| 68 | 67 | * @return string Returns the request method. |
| 69 | 68 | */ |
| 70 | - public function getMethod(); | |
| 69 | + public function getMethod(): string; | |
| 71 | 70 | |
| 72 | 71 | /** |
| 73 | 72 | * Return an instance with the provided HTTP method. |
| 74 | 73 | * |
| @@ -83,9 +82,9 @@ | ||
| 83 | 82 | * @param string $method Case-sensitive method. |
| 84 | 83 | * @return static |
| 85 | 84 | * @throws \InvalidArgumentException for invalid HTTP methods. |
| 86 | 85 | */ |
| 87 | - public function withMethod(string $method); | |
| 86 | + public function withMethod(string $method): RequestInterface; | |
| 88 | 87 | |
| 89 | 88 | /** |
| 90 | 89 | * Retrieves the URI instance. |
| 91 | 90 | * |
| @@ -94,9 +93,9 @@ | ||
| 94 | 93 | * @link http://tools.ietf.org/html/rfc3986#section-4.3 |
| 95 | 94 | * @return UriInterface Returns a UriInterface instance |
| 96 | 95 | * representing the URI of the request. |
| 97 | 96 | */ |
| 98 | - public function getUri(); | |
| 97 | + public function getUri(): UriInterface; | |
| 99 | 98 | |
| 100 | 99 | /** |
| 101 | 100 | * Returns an instance with the provided URI. |
| 102 | 101 | * |
| @@ -126,6 +125,6 @@ | ||
| 126 | 125 | * @param UriInterface $uri New request URI to use. |
| 127 | 126 | * @param bool $preserveHost Preserve the original state of the Host header. |
| 128 | 127 | * @return static |
| 129 | 128 | */ |
| 130 | - public function withUri(UriInterface $uri, bool $preserveHost = false); | |
| 129 | + public function withUri(UriInterface $uri, bool $preserveHost = false): RequestInterface; | |
| 131 | 130 | } |