Skip to content

Refine PHPDoc #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 44 additions & 34 deletions src/HttpAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Http\Adapter;

use Psr\Http\Message\StreamInterface;
use Psr\Http\Message\UriInterface;
use Psr\Http\Message\ResponseInterface;

Expand All @@ -25,7 +26,8 @@ interface HttpAdapter extends PsrHttpAdapter
* @param string|UriInterface $uri
* @param string[] $headers
*
* @throws HttpAdapterException If an error occurred.
* @throws \InvalidArgumentException
* @throws HttpAdapterException
*
* @return ResponseInterface
*/
Expand All @@ -37,7 +39,8 @@ public function get($uri, array $headers = []);
* @param string|UriInterface $uri
* @param string[] $headers
*
* @throws HttpAdapterException If an error occurred.
* @throws \InvalidArgumentException
* @throws HttpAdapterException
*
* @return ResponseInterface
*/
Expand All @@ -49,7 +52,8 @@ public function head($uri, array $headers = []);
* @param string|UriInterface $uri
* @param string[] $headers
*
* @throws HttpAdapterException If an error occurred.
* @throws \InvalidArgumentException
* @throws HttpAdapterException
*
* @return ResponseInterface
*/
Expand All @@ -58,12 +62,13 @@ public function trace($uri, array $headers = []);
/**
* Sends a POST request
*
* @param string|UriInterface $uri
* @param string[] $headers
* @param array|string $data
* @param array $files
* @param string|UriInterface $uri
* @param string[] $headers
* @param array|string|StreamInterface $data
* @param array $files
*
* @throws HttpAdapterException If an error occurred.
* @throws \InvalidArgumentException
* @throws HttpAdapterException
*
* @return ResponseInterface
*/
Expand All @@ -72,12 +77,13 @@ public function post($uri, array $headers = [], $data = [], array $files = []);
/**
* Sends a PUT request
*
* @param string|UriInterface $uri
* @param string[] $headers
* @param array|string $data
* @param array $files
* @param string|UriInterface $uri
* @param string[] $headers
* @param array|string|StreamInterface $data
* @param array $files
*
* @throws HttpAdapterException If an error occurred.
* @throws \InvalidArgumentException
* @throws HttpAdapterException
*
* @return ResponseInterface
*/
Expand All @@ -86,12 +92,13 @@ public function put($uri, array $headers = [], $data = [], array $files = []);
/**
* Sends a PATCH request
*
* @param string|UriInterface $uri
* @param string[] $headers
* @param array|string $data
* @param array $files
* @param string|UriInterface $uri
* @param string[] $headers
* @param array|string|StreamInterface $data
* @param array $files
*
* @throws HttpAdapterException If an error occurred.
* @throws \InvalidArgumentException
* @throws HttpAdapterException
*
* @return ResponseInterface
*/
Expand All @@ -100,12 +107,13 @@ public function patch($uri, array $headers = [], $data = [], array $files = []);
/**
* Sends a DELETE request
*
* @param string|UriInterface $uri
* @param string[] $headers
* @param array|string $data
* @param array $files
* @param string|UriInterface $uri
* @param string[] $headers
* @param array|string|StreamInterface $data
* @param array $files
*
* @throws HttpAdapterException If an error occurred.
* @throws \InvalidArgumentException
* @throws HttpAdapterException
*
* @return ResponseInterface
*/
Expand All @@ -114,12 +122,13 @@ public function delete($uri, array $headers = [], $data = [], array $files = [])
/**
* Sends an OPTIONS request
*
* @param string|UriInterface $uri
* @param string[] $headers
* @param array|string $data
* @param array $files
* @param string|UriInterface $uri
* @param string[] $headers
* @param array|string|StreamInterface $data
* @param array $files
*
* @throws HttpAdapterException If an error occurred.
* @throws \InvalidArgumentException
* @throws HttpAdapterException
*
* @return ResponseInterface
*/
Expand All @@ -128,13 +137,14 @@ public function options($uri, array $headers = [], $data = [], array $files = []
/**
* Sends a request
*
* @param string $method
* @param string|UriInterface $uri
* @param string[] $headers
* @param array|string $data
* @param array $files
* @param string $method
* @param string|UriInterface $uri
* @param string[] $headers
* @param array|string|StreamInterface $data
* @param array $files
*
* @throws HttpAdapterException If an error occurred.
* @throws \InvalidArgumentException
* @throws HttpAdapterException
*
* @return ResponseInterface
*/
Expand Down
6 changes: 4 additions & 2 deletions src/PsrHttpAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ interface PsrHttpAdapter
*
* @return ResponseInterface
*
* @throws HttpAdapterException If an error occurred.
* @throws \InvalidArgumentException
* @throws HttpAdapterException
*/
public function sendRequest(RequestInterface $request);

Expand All @@ -37,7 +38,8 @@ public function sendRequest(RequestInterface $request);
*
* @return ResponseInterface[]
*
* @throws MultiHttpAdapterException If an error occurred.
* @throws \InvalidArgumentException
* @throws MultiHttpAdapterException
*/
public function sendRequests(array $requests);

Expand Down