← All changes
|
includes/sdk/s3/Psr/Http/Message/MessageInterface.php
+11
-11
1.2.2
→
1.4.1
View file →
| @@ -22,9 +22,9 @@ | ||
| 22 | 22 | * The string MUST contain only the HTTP version number (e.g., "1.1", "1.0"). |
| 23 | 23 | * |
| 24 | 24 | * @return string HTTP protocol version. |
| 25 | 25 | */ |
| 26 | - public function getProtocolVersion(); | |
| 26 | + public function getProtocolVersion() : string; | |
| 27 | 27 | /** |
| 28 | 28 | * Return an instance with the specified HTTP protocol version. |
| 29 | 29 | * |
| 30 | 30 | * The version string MUST contain only the HTTP version number (e.g., |
| @@ -36,9 +36,9 @@ | ||
| 36 | 36 | * |
| 37 | 37 | * @param string $version HTTP protocol version |
| 38 | 38 | * @return static |
| 39 | 39 | */ |
| 40 | - public function withProtocolVersion($version); | |
| 40 | + public function withProtocolVersion(string $version) : MessageInterface; | |
| 41 | 41 | /** |
| 42 | 42 | * Retrieves all message header values. |
| 43 | 43 | * |
| 44 | 44 | * The keys represent the header name as it will be sent over the wire, and |
| @@ -62,9 +62,9 @@ | ||
| 62 | 62 | * @return string[][] Returns an associative array of the message's headers. Each |
| 63 | 63 | * key MUST be a header name, and each value MUST be an array of strings |
| 64 | 64 | * for that header. |
| 65 | 65 | */ |
| 66 | - public function getHeaders(); | |
| 66 | + public function getHeaders() : array; | |
| 67 | 67 | /** |
| 68 | 68 | * Checks if a header exists by the given case-insensitive name. |
| 69 | 69 | * |
| 70 | 70 | * @param string $name Case-insensitive header field name. |
| @@ -71,9 +71,9 @@ | ||
| 71 | 71 | * @return bool Returns true if any header names match the given header |
| 72 | 72 | * name using a case-insensitive string comparison. Returns false if |
| 73 | 73 | * no matching header name is found in the message. |
| 74 | 74 | */ |
| 75 | - public function hasHeader($name); | |
| 75 | + public function hasHeader(string $name) : bool; | |
| 76 | 76 | /** |
| 77 | 77 | * Retrieves a message header value by the given case-insensitive name. |
| 78 | 78 | * |
| 79 | 79 | * This method returns an array of all the header values of the given |
| @@ -86,9 +86,9 @@ | ||
| 86 | 86 | * @return string[] An array of string values as provided for the given |
| 87 | 87 | * header. If the header does not appear in the message, this method MUST |
| 88 | 88 | * return an empty array. |
| 89 | 89 | */ |
| 90 | - public function getHeader($name); | |
| 90 | + public function getHeader(string $name) : array; | |
| 91 | 91 | /** |
| 92 | 92 | * Retrieves a comma-separated string of the values for a single header. |
| 93 | 93 | * |
| 94 | 94 | * This method returns all of the header values of the given |
| @@ -106,9 +106,9 @@ | ||
| 106 | 106 | * @return string A string of values as provided for the given header |
| 107 | 107 | * concatenated together using a comma. If the header does not appear in |
| 108 | 108 | * the message, this method MUST return an empty string. |
| 109 | 109 | */ |
| 110 | - public function getHeaderLine($name); | |
| 110 | + public function getHeaderLine(string $name) : string; | |
| 111 | 111 | /** |
| 112 | 112 | * Return an instance with the provided value replacing the specified header. |
| 113 | 113 | * |
| 114 | 114 | * While header names are case-insensitive, the casing of the header will |
| @@ -122,9 +122,9 @@ | ||
| 122 | 122 | * @param string|string[] $value Header value(s). |
| 123 | 123 | * @return static |
| 124 | 124 | * @throws \InvalidArgumentException for invalid header names or values. |
| 125 | 125 | */ |
| 126 | - public function withHeader($name, $value); | |
| 126 | + public function withHeader(string $name, $value) : MessageInterface; | |
| 127 | 127 | /** |
| 128 | 128 | * Return an instance with the specified header appended with the given value. |
| 129 | 129 | * |
| 130 | 130 | * Existing values for the specified header will be maintained. The new |
| @@ -139,9 +139,9 @@ | ||
| 139 | 139 | * @param string|string[] $value Header value(s). |
| 140 | 140 | * @return static |
| 141 | 141 | * @throws \InvalidArgumentException for invalid header names or values. |
| 142 | 142 | */ |
| 143 | - public function withAddedHeader($name, $value); | |
| 143 | + public function withAddedHeader(string $name, $value) : MessageInterface; | |
| 144 | 144 | /** |
| 145 | 145 | * Return an instance without the specified header. |
| 146 | 146 | * |
| 147 | 147 | * Header resolution MUST be done without case-sensitivity. |
| @@ -152,15 +152,15 @@ | ||
| 152 | 152 | * |
| 153 | 153 | * @param string $name Case-insensitive header field name to remove. |
| 154 | 154 | * @return static |
| 155 | 155 | */ |
| 156 | - public function withoutHeader($name); | |
| 156 | + public function withoutHeader(string $name) : MessageInterface; | |
| 157 | 157 | /** |
| 158 | 158 | * Gets the body of the message. |
| 159 | 159 | * |
| 160 | 160 | * @return StreamInterface Returns the body as a stream. |
| 161 | 161 | */ |
| 162 | - public function getBody(); | |
| 162 | + public function getBody() : StreamInterface; | |
| 163 | 163 | /** |
| 164 | 164 | * Return an instance with the specified message body. |
| 165 | 165 | * |
| 166 | 166 | * The body MUST be a StreamInterface object. |
| @@ -172,6 +172,6 @@ | ||
| 172 | 172 | * @param StreamInterface $body Body. |
| 173 | 173 | * @return static |
| 174 | 174 | * @throws \InvalidArgumentException When the body is not valid. |
| 175 | 175 | */ |
| 176 | - public function withBody(StreamInterface $body); | |
| 176 | + public function withBody(StreamInterface $body) : MessageInterface; | |
| 177 | 177 | } |