Skip to content

Commit d4d3ec0

Browse files
Merge pull request #4 from php-fig/patch-1
Some cleanup and added PSR7 as requirement
2 parents c6e0589 + 678abfb commit d4d3ec0

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^7.0"
14+
"php": "^7.0",
15+
"psr/http-message": "^1.0"
1516
},
1617
"autoload": {
1718
"psr-4": {

src/ClientInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ interface ClientInterface
1010
/**
1111
* Sends a PSR-7 request and returns a PSR-7 response.
1212
*
13-
* Every technically correct HTTP response MUST be returned as is, even if it represents an HTTP
13+
* Every technically correct HTTP response MUST be returned as is, even if it represents a HTTP
1414
* error response or a redirect instruction. The only special case is 1xx responses, which MUST
1515
* be assembled in the HTTP client.
1616
*
@@ -25,7 +25,7 @@ interface ClientInterface
2525
*
2626
* @return ResponseInterface
2727
*
28-
* @throws \Psr\Http\Client\Exception If an error happens during processing the request.
28+
* @throws \Psr\Http\Client\ClientException If an error happens during processing the request.
2929
*/
3030
public function sendRequest(RequestInterface $request): ResponseInterface;
3131
}

src/Exception/RequestException.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
namespace Psr\Http\Client\Exception;
44

5-
use Psr\Http\Message\RequestInterface;
65
use Psr\Http\Client\ClientException;
6+
use Psr\Http\Message\RequestInterface;
77

88
/**
99
* Exception for when a request failed.
1010
*
1111
* Examples:
12-
* - Request is invalid (eg. method is missing)
13-
* - Runtime request errors (like the body stream is not seekable)
12+
* - Request is invalid (e.g. method is missing)
13+
* - Runtime request errors (e.g. the body stream is not seekable)
1414
*/
1515
interface RequestException extends ClientException
1616
{

0 commit comments

Comments
 (0)