Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/AbstractMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ abstract class AbstractMessage extends Message
* (AbstractMessage::VERSION_10, AbstractMessage::VERSION_11, AbstractMessage::VERSION_2)
*
* @param string $version (Must be 1.0, 1.1 or 2)
* @return AbstractMessage
* @return $this
* @throws Exception\InvalidArgumentException
*/
public function setVersion($version)
Expand Down Expand Up @@ -69,7 +69,7 @@ public function getVersion()
*
* @see getHeaders()
* @param Headers $headers
* @return AbstractMessage
* @return $this
*/
public function setHeaders(Headers $headers)
{
Expand Down
48 changes: 23 additions & 25 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function __construct($uri = null, $options = null)
* Set configuration parameters for this HTTP client
*
* @param array|Traversable $options
* @return Client
* @return $this
* @throws Client\Exception\InvalidArgumentException
*/
public function setOptions($options = [])
Expand Down Expand Up @@ -184,7 +184,7 @@ public function setOptions($options = [])
* separated from ->request() to preserve logic and readability
*
* @param Client\Adapter\AdapterInterface|string $adapter
* @return Client
* @return $this
* @throws Client\Exception\InvalidArgumentException
*/
public function setAdapter($adapter)
Expand Down Expand Up @@ -212,7 +212,7 @@ public function setAdapter($adapter)
/**
* Load the connection adapter
*
* @return Client\Adapter\AdapterInterface $adapter
* @return Client\Adapter\AdapterInterface
*/
public function getAdapter()
{
Expand All @@ -227,7 +227,7 @@ public function getAdapter()
* Set request
*
* @param Request $request
* @return Client
* @return $this
*/
public function setRequest(Request $request)
{
Expand All @@ -253,7 +253,7 @@ public function getRequest()
* Set response
*
* @param Response $response
* @return Client
* @return $this
*/
public function setResponse(Response $response)
{
Expand Down Expand Up @@ -308,7 +308,7 @@ public function getRedirectionsCount()
* Set Uri (to the request)
*
* @param string|Http $uri
* @return Client
* @return $this
*/
public function setUri($uri)
{
Expand Down Expand Up @@ -356,7 +356,7 @@ public function getUri()
* Set the HTTP method (to the request)
*
* @param string $method
* @return Client
* @return $this
*/
public function setMethod($method)
{
Expand Down Expand Up @@ -395,7 +395,7 @@ public function getMethod()
* Set the query string argument separator
*
* @param string $argSeparator
* @return Client
* @return $this
*/
public function setArgSeparator($argSeparator)
{
Expand Down Expand Up @@ -423,7 +423,7 @@ public function getArgSeparator()
*
* @param string $encType
* @param string $boundary
* @return Client
* @return $this
*/
public function setEncType($encType, $boundary = null)
{
Expand Down Expand Up @@ -454,7 +454,7 @@ public function getEncType()
* Set raw body (for advanced use cases)
*
* @param string $body
* @return Client
* @return $this
*/
public function setRawBody($body)
{
Expand All @@ -466,7 +466,7 @@ public function setRawBody($body)
* Set the POST parameters
*
* @param array $post
* @return Client
* @return $this
*/
public function setParameterPost(array $post)
{
Expand All @@ -478,7 +478,7 @@ public function setParameterPost(array $post)
* Set the GET parameters
*
* @param array $query
* @return Client
* @return $this
*/
public function setParameterGet(array $query)
{
Expand All @@ -491,7 +491,7 @@ public function setParameterGet(array $query)
*
* @param bool $clearCookies Also clear all valid cookies? (defaults to false)
* @param bool $clearAuth Also clear http authentication? (defaults to true)
* @return Client
* @return $this
*/
public function resetParameters($clearCookies = false /*, $clearAuth = true */)
{
Expand Down Expand Up @@ -559,7 +559,7 @@ protected function getCookieId($cookie)
* @param string $maxAge
* @param string $version
* @throws Exception\InvalidArgumentException
* @return Client
* @return $this
*/
public function addCookie(
$cookie,
Expand Down Expand Up @@ -606,7 +606,7 @@ public function addCookie(
*
* @param array|SetCookie[] $cookies Cookies as name=>value pairs or instances of SetCookie.
* @throws Exception\InvalidArgumentException
* @return Client
* @return $this
*/
public function setCookies($cookies)
{
Expand Down Expand Up @@ -638,7 +638,7 @@ public function clearCookies()
*
* @param Headers|array $headers
* @throws Exception\InvalidArgumentException
* @return Client
* @return $this
*/
public function setHeaders($headers)
{
Expand Down Expand Up @@ -693,7 +693,7 @@ public function getHeader($name)
* Set streaming for received data
*
* @param string|bool $streamfile Stream file, true for temp file, false/null for no streaming
* @return \Zend\Http\Client
* @return $this
*/
public function setStream($streamfile = true)
{
Expand All @@ -717,8 +717,8 @@ public function getStream()
/**
* Create temporary stream
*
* @throws Exception\RuntimeException
* @return resource
* @throws Exception\RuntimeException
*/
protected function openTempStream()
{
Expand Down Expand Up @@ -753,7 +753,7 @@ protected function openTempStream()
* @param string $password
* @param string $type
* @throws Exception\InvalidArgumentException
* @return Client
* @return $this
*/
public function setAuth($user, $password, $type = self::AUTH_BASIC)
{
Expand Down Expand Up @@ -865,7 +865,7 @@ public function dispatch(Stdlib\RequestInterface $request, Stdlib\ResponseInterf
/**
* Send HTTP request
*
* @param Request $request
* @param Request|null $request
* @return Response
* @throws Exception\RuntimeException
* @throws Client\Exception\RuntimeException
Expand Down Expand Up @@ -1043,7 +1043,7 @@ public function send(Request $request = null)
/**
* Fully reset the HTTP client (auth, cookies, request, response, etc.)
*
* @return Client
* @return $this
*/
public function reset()
{
Expand Down Expand Up @@ -1071,7 +1071,7 @@ public function reset()
* @param string $data Data to send (if null, $filename is read and sent)
* @param string $ctype Content type to use (if $data is set and $ctype is
* null, will be application/octet-stream)
* @return Client
* @return $this
* @throws Exception\RuntimeException
*/
public function setFileUpload($filename, $formname, $data = null, $ctype = null)
Expand Down Expand Up @@ -1154,8 +1154,8 @@ protected function prepareCookies($domain, $path, $secure)
*
* @param resource|string $body
* @param Http $uri
* @throws Exception\RuntimeException
* @return array
* @throws Exception\RuntimeException
*/
protected function prepareHeaders($body, $uri)
{
Expand Down Expand Up @@ -1499,7 +1499,5 @@ public static function encodeAuthHeader($user, $password, $type = self::AUTH_BAS
$type
));
}

return;
}
}
6 changes: 3 additions & 3 deletions src/Client/Adapter/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function __construct()
* Set the configuration array for the adapter
*
* @param array|Traversable $options
* @return Curl
* @return $this
* @throws AdapterException\InvalidArgumentException
*/
public function setOptions($options = [])
Expand Down Expand Up @@ -168,7 +168,7 @@ public function getConfig()
*
* @param string|int $option
* @param mixed $value
* @return Curl
* @return $this
*/
public function setCurlOption($option, $value)
{
Expand Down Expand Up @@ -553,7 +553,7 @@ public function getHandle()
* Set output stream for the response
*
* @param resource $stream
* @return Curl
* @return $this
*/
public function setOutputStream($stream)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Client/Adapter/Socket.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function getConfig()
*
* @param mixed $context Stream context or array of context options
* @throws Exception\InvalidArgumentException
* @return Socket
* @return $this
*/
public function setStreamContext($context)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Cookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ protected function _matchPath($domains, $path)
*
* @param Response $response HTTP Response object
* @param Uri\Uri|string $refUri The requested URI
* @return Cookies
* @return static
* @todo Add the $uri functionality.
*/
public static function fromResponse(Response $response, $refUri)
Expand All @@ -361,7 +361,7 @@ public function isEmpty()
/**
* Empties the cookieJar of any cookie
*
* @return Cookies
* @return $this
*/
public function reset()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Header/AbstractAccept.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function parseHeaderLine($headerLine)
* Factory method: parse Accept header string
*
* @param string $headerLine
* @return Accept
* @return static
*/
public static function fromString($headerLine)
{
Expand Down Expand Up @@ -242,7 +242,7 @@ function ($v) {
* @param int|float $priority
* @param array (optional) $params
* @throws Exception\InvalidArgumentException
* @return Accept
* @return $this
*/
protected function addType($type, $priority = 1, array $params = [])
{
Expand Down
12 changes: 4 additions & 8 deletions src/Header/AbstractDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ abstract class AbstractDate implements HeaderInterface
* Create date-based header from string
*
* @param string $headerLine
* @return AbstractDate
* @return static
* @throws Exception\InvalidArgumentException
*/
public static function fromString($headerLine)
Expand All @@ -90,9 +90,7 @@ public static function fromString($headerLine)
* Create date-based header from strtotime()-compatible string
*
* @param int|string $time
*
* @return self
*
* @return static
* @throws Exception\InvalidArgumentException
*/
public static function fromTimeString($time)
Expand All @@ -104,9 +102,7 @@ public static function fromTimeString($time)
* Create date-based header from Unix timestamp
*
* @param int $time
*
* @return self
*
* @return static
* @throws Exception\InvalidArgumentException
*/
public static function fromTimestamp($time)
Expand Down Expand Up @@ -156,7 +152,7 @@ public static function getDateFormat()
* Set the date for this header, this can be a string or an instance of \DateTime
*
* @param string|DateTime $date
* @return AbstractDate
* @return $this
* @throws Exception\InvalidArgumentException
*/
public function setDate($date)
Expand Down
4 changes: 2 additions & 2 deletions src/Header/AbstractLocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ abstract class AbstractLocation implements HeaderInterface
* Create location-based header from string
*
* @param string $headerLine
* @return AbstractLocation
* @return static
* @throws Exception\InvalidArgumentException
*/
public static function fromString($headerLine)
Expand All @@ -62,7 +62,7 @@ public static function fromString($headerLine)
* Set the URI/URL for this header, this can be a string or an instance of Zend\Uri\Http
*
* @param string|UriInterface $uri
* @return AbstractLocation
* @return $this
* @throws Exception\InvalidArgumentException
*/
public function setUri($uri)
Expand Down
2 changes: 1 addition & 1 deletion src/Header/Accept.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function toString()
* @param string $type
* @param int|float $priority
* @param array $params
* @return Accept
* @return $this
*/
public function addMediaType($type, $priority = 1, array $params = [])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct($internalValues)
* Set a Field Value Part this Field Value Part matched against.
*
* @param AbstractFieldValuePart $matchedAgainst
* @return AbstractFieldValuePart provides fluent interface
* @return $this
*/
public function setMatchedAgainst(AbstractFieldValuePart $matchedAgainst)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Header/AcceptCharset.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function toString()
*
* @param string $type
* @param int|float $priority
* @return Accept
* @return $this
*/
public function addCharset($type, $priority = 1)
{
Expand Down
Loading