From a43db06af6760350dd78bc0fa87388daaa45597a Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Wed, 27 Jan 2016 15:46:01 +0100 Subject: [PATCH] Updated doc block to be coherent with the suggested PSR --- src/CachePlugin.php | 10 +++++----- src/DecoderPlugin.php | 6 +++--- src/PluginClient.php | 5 ++++- src/RedirectPlugin.php | 8 ++++---- src/RetryPlugin.php | 6 +++--- 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/CachePlugin.php b/src/CachePlugin.php index fecbc65..62c9715 100644 --- a/src/CachePlugin.php +++ b/src/CachePlugin.php @@ -32,13 +32,13 @@ class CachePlugin implements Plugin private $config; /** - * Available options for $config are - * - respect_cache_headers: Whether to look at the cache directives or ignore them. - * - default_ttl: If we do not respect cache headers or can't calculate a good ttl, use this value. - * * @param CacheItemPoolInterface $pool * @param StreamFactory $streamFactory - * @param array $config + * @param array $config { + * + * @var bool $respect_cache_headers Whether to look at the cache directives or ignore them. + * @var int $default_ttl If we do not respect cache headers or can't calculate a good ttl, use this value. + * } */ public function __construct(CacheItemPoolInterface $pool, StreamFactory $streamFactory, array $config = []) { diff --git a/src/DecoderPlugin.php b/src/DecoderPlugin.php index 11f19a8..4b49bfb 100644 --- a/src/DecoderPlugin.php +++ b/src/DecoderPlugin.php @@ -30,10 +30,10 @@ class DecoderPlugin implements Plugin private $useContentEncoding; /** - * Available options for $config are: - * - use_content_encoding: Whether this plugin should look at the Content-Encoding header first or only at the Transfer-Encoding (defaults to true). + * @param array $config { * - * @param array $config + * @var bool $use_content_encoding Whether this plugin should look at the Content-Encoding header first or only at the Transfer-Encoding (defaults to true). + * } */ public function __construct(array $config = []) { diff --git a/src/PluginClient.php b/src/PluginClient.php index 2fed906..2d276ed 100644 --- a/src/PluginClient.php +++ b/src/PluginClient.php @@ -43,7 +43,10 @@ final class PluginClient implements HttpClient, HttpAsyncClient /** * @param HttpClient|HttpAsyncClient $client * @param Plugin[] $plugins - * @param array $options + * @param array $options { + * + * @var int $max_restarts + * } * * @throws \RuntimeException if client is not an instance of HttpClient or HttpAsyncClient */ diff --git a/src/RedirectPlugin.php b/src/RedirectPlugin.php index 27bf871..7a3f775 100644 --- a/src/RedirectPlugin.php +++ b/src/RedirectPlugin.php @@ -99,11 +99,11 @@ class RedirectPlugin implements Plugin protected $circularDetection = []; /** - * Available options for $config are: - * - preserve_header: bool|string[] True keeps all headers, false remove all of them, an array is interpreted as a list of header names to keep. - * - use_default_for_multiple: Whether the location header must be directly used for a multiple redirection status code (300). + * @param array $config { * - * @param array $config + * @var bool|string[] $preserve_header True keeps all headers, false remove all of them, an array is interpreted as a list of header names to keep. + * @var bool $use_default_for_multiple Whether the location header must be directly used for a multiple redirection status code (300). + * } */ public function __construct(array $config = []) { diff --git a/src/RetryPlugin.php b/src/RetryPlugin.php index 44a1619..80097da 100644 --- a/src/RetryPlugin.php +++ b/src/RetryPlugin.php @@ -31,10 +31,10 @@ class RetryPlugin implements Plugin private $retryStorage = []; /** - * Available options for $config are: - * - retries: Number of retries to attempt if an exception occurs before letting the exception bubble up. + * @param array $config { * - * @param array $config + * @var int $retries Number of retries to attempt if an exception occurs before letting the exception bubble up. + * } */ public function __construct(array $config = []) {