Skip to content

Commit

Permalink
Merge pull request #2 from voku/scrutinizer-patch-1
Browse files Browse the repository at this point in the history
Scrutinizer Auto-Fixes
  • Loading branch information
voku committed Apr 30, 2016
2 parents f74d2c3 + f686eb0 commit f8882fc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
8 changes: 4 additions & 4 deletions examples/showclix.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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";
2 changes: 1 addition & 1 deletion src/Httpful/Handlers/XmlHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions src/Httpful/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -696,7 +696,7 @@ public function expects($mime)
/**
* @alias of expects
*
* @param $mime
* @param string|null $mime
*
* @return Request
*/
Expand Down Expand Up @@ -830,7 +830,7 @@ public function contentType($mime)
/**
* @alias of contentType
*
* @param $mime
* @param string $mime
*
* @return Request
*/
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1300,7 +1300,7 @@ private function _setDefaults()
}

/**
* @param $error
* @param string $error
*/
private function _error($error)
{
Expand Down Expand Up @@ -1689,7 +1689,7 @@ public function addOnCurlOption($curlopt, $curloptval)
*
* @see Request::registerPayloadSerializer()
*
* @param mixed $payload
* @param string $payload
*
* @return string
*/
Expand Down
3 changes: 2 additions & 1 deletion src/Httpful/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -149,7 +150,7 @@ public function _parseHeaders($headers)
}

/**
* @param $headers
* @param string $headers
*
* @return int
* @throws \Exception
Expand Down

0 comments on commit f8882fc

Please sign in to comment.