diff --git a/CHANGELOG.md b/CHANGELOG.md index a45fcba..3c90ecb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## 2.0 (unreleased) +## 2.0.0 - 2019-02-03 ### Changed - HttpClientRouter now throws a HttpClientNoMatchException instead of a RequestException if it can not find a client for the request. @@ -10,7 +10,7 @@ - Abstract method `HttpClientPool::chooseHttpClient()` has now an explicit return type (`Http\Client\Common\HttpClientPoolItem`) - Interface method `Plugin::handleRequest(...)` has now an explicit return type (`Http\Promise\Promise`) - Made classes final that are not intended to be extended. - Added interfaces for BatchClient, HttpClientRouter and HttpMethodsClient. +- Added interfaces for BatchClient, HttpClientRouter and HttpMethodsClient. (These interfaces use the `Interface` suffix to avoid name collisions.) - Added an interface for HttpClientPool and moved the abstract class to the HttpClientPool sub namespace. - AddPathPlugin: Do not add the prefix if the URL already has the same prefix. diff --git a/src/BatchClientInterface.php b/src/BatchClientInterface.php index 4fc70e8..d42eb2d 100644 --- a/src/BatchClientInterface.php +++ b/src/BatchClientInterface.php @@ -22,7 +22,7 @@ interface BatchClientInterface * You may not assume that the requests are executed in a particular order. If the order matters * for your application, use sendRequest sequentially. * - * @param RequestInterface[] The requests to send + * @param RequestInterface[] $requests The requests to send * * @return BatchResult Containing one result per request * diff --git a/src/Exception/BatchException.php b/src/Exception/BatchException.php index 46d1e47..cbda665 100644 --- a/src/Exception/BatchException.php +++ b/src/Exception/BatchException.php @@ -24,6 +24,7 @@ final class BatchException extends TransferException public function __construct(BatchResult $result) { $this->result = $result; + parent::__construct(); } /** diff --git a/src/Plugin/ContentTypePlugin.php b/src/Plugin/ContentTypePlugin.php index f3944dd..c3fb25c 100644 --- a/src/Plugin/ContentTypePlugin.php +++ b/src/Plugin/ContentTypePlugin.php @@ -106,9 +106,6 @@ private function isJson(StreamInterface $stream): bool return JSON_ERROR_NONE === json_last_error(); } - /** - * @param $stream StreamInterface - */ private function isXml(StreamInterface $stream): bool { if (!function_exists('simplexml_load_string')) { diff --git a/src/PluginClient.php b/src/PluginClient.php index 8288445..7a44aab 100644 --- a/src/PluginClient.php +++ b/src/PluginClient.php @@ -25,7 +25,7 @@ final class PluginClient implements HttpClient, HttpAsyncClient /** * An HTTP async client. * - * @var HttpAsyncClient + * @var HttpAsyncClient|HttpClient */ private $client; diff --git a/src/PluginClientFactory.php b/src/PluginClientFactory.php index 6ae5091..3806e09 100644 --- a/src/PluginClientFactory.php +++ b/src/PluginClientFactory.php @@ -16,7 +16,7 @@ final class PluginClientFactory { /** - * @var callable + * @var callable|null */ private static $factory;