From f686eb02af75a1982ee54ed1d26d67dd1752ccff Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Sat, 30 Apr 2016 15:27:13 +0000 Subject: [PATCH] Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- examples/showclix.php | 8 ++++---- src/Httpful/Handlers/XmlHandler.php | 2 +- src/Httpful/Request.php | 12 ++++++------ src/Httpful/Response.php | 3 ++- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/examples/showclix.php b/examples/showclix.php index 03bfdf8..9fa7898 100644 --- a/examples/showclix.php +++ b/examples/showclix.php @@ -12,8 +12,8 @@ // $uri = 'http://api.showclix.com/Event/8175'; $response = Request::get($uri) - ->expectsType('json') - ->send(); + ->expectsType('json') + ->send(); // // Print out the event details @@ -26,8 +26,8 @@ Httpful::register(Mime::JSON, new JsonHandler(array('decode_as_array' => true))); $response = Request::get($uri) - ->expectsType('json') - ->send(); + ->expectsType('json') + ->send(); // Print out the event details echo "The event {$response->body['event']} will take place on {$response->body['event_start']}\n"; diff --git a/src/Httpful/Handlers/XmlHandler.php b/src/Httpful/Handlers/XmlHandler.php index 2fcf404..401de6a 100644 --- a/src/Httpful/Handlers/XmlHandler.php +++ b/src/Httpful/Handlers/XmlHandler.php @@ -37,7 +37,7 @@ public function __construct(array $conf = array()) /** * @param string $body * - * @return mixed + * @return null|\SimpleXMLElement * @throws \Exception if unable to parse */ public function parse($body) diff --git a/src/Httpful/Request.php b/src/Httpful/Request.php index 66bc4ac..41f93e2 100644 --- a/src/Httpful/Request.php +++ b/src/Httpful/Request.php @@ -353,7 +353,7 @@ public function setConnectionTimeout($connection_timeout) * If the response is a 301 or 302 redirect, automatically * send off another request to that location * - * @param bool|int $follow follow or not to follow or maximal number of redirects + * @param boolean $follow follow or not to follow or maximal number of redirects * * @return Request */ @@ -696,7 +696,7 @@ public function expects($mime) /** * @alias of expects * - * @param $mime + * @param string|null $mime * * @return Request */ @@ -830,7 +830,7 @@ public function contentType($mime) /** * @alias of contentType * - * @param $mime + * @param string $mime * * @return Request */ @@ -899,7 +899,7 @@ public function useProxy($proxy_host, $proxy_port = 80, $auth_type = null, $auth $this->addOnCurlOption(CURLOPT_PROXYTYPE, $proxy_type); if (in_array($auth_type, array(CURLAUTH_BASIC, CURLAUTH_NTLM), true)) { $this->addOnCurlOption(CURLOPT_PROXYAUTH, $auth_type) - ->addOnCurlOption(CURLOPT_PROXYUSERPWD, "{$auth_username}:{$auth_password}"); + ->addOnCurlOption(CURLOPT_PROXYUSERPWD, "{$auth_username}:{$auth_password}"); } return $this; @@ -1300,7 +1300,7 @@ private function _setDefaults() } /** - * @param $error + * @param string $error */ private function _error($error) { @@ -1689,7 +1689,7 @@ public function addOnCurlOption($curlopt, $curloptval) * * @see Request::registerPayloadSerializer() * - * @param mixed $payload + * @param string $payload * * @return string */ diff --git a/src/Httpful/Response.php b/src/Httpful/Response.php index e5b85a1..f692f48 100644 --- a/src/Httpful/Response.php +++ b/src/Httpful/Response.php @@ -104,6 +104,7 @@ public function hasBody() * Mime type. * * @param string Http response body + * @param string $body * * @return array|string|object the response parse accordingly */ @@ -149,7 +150,7 @@ public function _parseHeaders($headers) } /** - * @param $headers + * @param string $headers * * @return int * @throws \Exception