From a45191423b290fe02703fee0f109ab1b0369e580 Mon Sep 17 00:00:00 2001 From: Adam Malone Date: Sat, 29 Feb 2020 11:23:49 +1100 Subject: [PATCH] Adds inheritdocs to the constructor classes and changes addOptions parameter to mixed. --- src/Connector/Client.php | 44 +++++++------------------------ src/Connector/ClientInterface.php | 6 ++--- src/Connector/Connector.php | 19 +++---------- 3 files changed, 15 insertions(+), 54 deletions(-) diff --git a/src/Connector/Client.php b/src/Connector/Client.php index 32892ff6..db85d81d 100644 --- a/src/Connector/Client.php +++ b/src/Connector/Client.php @@ -49,13 +49,7 @@ public static function factory(ConnectorInterface $connector) } /** - * Takes parameters passed in, makes a request to the API, and processes the response. - * - * @param string $verb - * @param string $path - * @param array $options - * - * @return mixed|StreamInterface + * @inheritdoc */ public function request(string $verb, string $path, array $options = []) { @@ -72,13 +66,7 @@ public function request(string $verb, string $path, array $options = []) } /** - * Makes a request to the API. - * - * @param string $verb - * @param string $path - * @param array $options - * - * @return ResponseInterface + * @inheritdoc */ public function makeRequest(string $verb, string $path, array $options = []) { @@ -92,11 +80,7 @@ public function makeRequest(string $verb, string $path, array $options = []) } /** - * Processes the returned response from the API. - * - * @param ResponseInterface $response - * @return mixed|StreamInterface - * @throws ApiErrorException + * @inheritdoc */ public function processResponse(ResponseInterface $response) { @@ -120,9 +104,7 @@ public function processResponse(ResponseInterface $response) } /** - * Get query from Client. - * - * @return array + * @inheritdoc */ public function getQuery() { @@ -130,7 +112,7 @@ public function getQuery() } /** - * Clear query. + * @inheritdoc */ public function clearQuery() { @@ -138,10 +120,7 @@ public function clearQuery() } /** - * Add a query parameter to filter results. - * - * @param string $name - * @param string|int $value + * @inheritdoc */ public function addQuery($name, $value) { @@ -149,9 +128,7 @@ public function addQuery($name, $value) } /** - * Get options from Client. - * - * @return array + * @inheritdoc */ public function getOptions() { @@ -159,7 +136,7 @@ public function getOptions() } /** - * Clear options. + * @inheritdoc */ public function clearOptions() { @@ -167,10 +144,7 @@ public function clearOptions() } /** - * Add an option to the Guzzle request object. - * - * @param string $name - * @param string|int|array $value + * @inheritdoc */ public function addOption($name, $value) { diff --git a/src/Connector/ClientInterface.php b/src/Connector/ClientInterface.php index 8e22e5f7..143d6c24 100644 --- a/src/Connector/ClientInterface.php +++ b/src/Connector/ClientInterface.php @@ -15,7 +15,7 @@ interface ClientInterface { /** - * Makes a request to the API. + * Takes parameters passed in, makes a request to the API, and processes the response. * * @param string $verb * @param string $path @@ -77,8 +77,8 @@ public function clearOptions(); /** * Add an option to the Guzzle request object. * - * @param string $name - * @param string|int|array $value + * @param string $name + * @param mixed $value */ public function addOption($name, $value); } diff --git a/src/Connector/Connector.php b/src/Connector/Connector.php index 40e37eb4..326268e2 100644 --- a/src/Connector/Connector.php +++ b/src/Connector/Connector.php @@ -38,9 +38,7 @@ class Connector implements ConnectorInterface protected $accessToken; /** - * Connector constructor. - * - * @param array $config + * @inheritdoc */ public function __construct(array $config) { @@ -54,12 +52,7 @@ public function __construct(array $config) } /** - * Creates an authenticated Request instance. - * - * @param string $verb - * @param string $path - * - * @return RequestInterface + * @inheritdoc */ public function createRequest($verb, $path) { @@ -75,13 +68,7 @@ public function createRequest($verb, $path) } /** - * Sends the request to the API using Guzzle. - * - * @param string $verb - * @param string $path - * @param array $options - * - * @return ResponseInterface + * @inheritdoc */ public function sendRequest($verb, $path, $options) {