| @@ -1,6 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | +declare(strict_types=1); | |
| 4 | + | |
| 3 | 5 | namespace Psr\Http\Message; |
| 4 | 6 | |
| 5 | 7 | /** |
| 6 | 8 | * Representation of an outgoing, client-side request. |
| @@ -54,12 +56,12 @@ | ||
| 54 | 56 | * changed request target. |
| 55 | 57 | * |
| 56 | 58 | * @link http://tools.ietf.org/html/rfc7230#section-5.3 (for the various |
| 57 | 59 | * request-target forms allowed in request messages) |
| 58 | - * @param mixed $requestTarget | |
| 60 | + * @param string $requestTarget | |
| 59 | 61 | * @return static |
| 60 | 62 | */ |
| 61 | - public function withRequestTarget($requestTarget); | |
| 63 | + public function withRequestTarget(string $requestTarget); | |
| 62 | 64 | |
| 63 | 65 | /** |
| 64 | 66 | * Retrieves the HTTP method of the request. |
| 65 | 67 | * |
| @@ -81,9 +83,9 @@ | ||
| 81 | 83 | * @param string $method Case-sensitive method. |
| 82 | 84 | * @return static |
| 83 | 85 | * @throws \InvalidArgumentException for invalid HTTP methods. |
| 84 | 86 | */ |
| 85 | - public function withMethod($method); | |
| 87 | + public function withMethod(string $method); | |
| 86 | 88 | |
| 87 | 89 | /** |
| 88 | 90 | * Retrieves the URI instance. |
| 89 | 91 | * |
| @@ -124,6 +126,6 @@ | ||
| 124 | 126 | * @param UriInterface $uri New request URI to use. |
| 125 | 127 | * @param bool $preserveHost Preserve the original state of the Host header. |
| 126 | 128 | * @return static |
| 127 | 129 | */ |
| 128 | - public function withUri(UriInterface $uri, $preserveHost = false); | |
| 130 | + public function withUri(UriInterface $uri, bool $preserveHost = false); | |
| 129 | 131 | } |