@@ -152,7 +152,7 @@ public function __construct($uri = null, $options = null)
152
152
* Set configuration parameters for this HTTP client
153
153
*
154
154
* @param array|Traversable $options
155
- * @return Client
155
+ * @return $this
156
156
* @throws Client\Exception\InvalidArgumentException
157
157
*/
158
158
public function setOptions ($ options = [])
@@ -184,7 +184,7 @@ public function setOptions($options = [])
184
184
* separated from ->request() to preserve logic and readability
185
185
*
186
186
* @param Client\Adapter\AdapterInterface|string $adapter
187
- * @return Client
187
+ * @return $this
188
188
* @throws Client\Exception\InvalidArgumentException
189
189
*/
190
190
public function setAdapter ($ adapter )
@@ -212,7 +212,7 @@ public function setAdapter($adapter)
212
212
/**
213
213
* Load the connection adapter
214
214
*
215
- * @return Client\Adapter\AdapterInterface $adapter
215
+ * @return Client\Adapter\AdapterInterface
216
216
*/
217
217
public function getAdapter ()
218
218
{
@@ -227,7 +227,7 @@ public function getAdapter()
227
227
* Set request
228
228
*
229
229
* @param Request $request
230
- * @return Client
230
+ * @return $this
231
231
*/
232
232
public function setRequest (Request $ request )
233
233
{
@@ -253,7 +253,7 @@ public function getRequest()
253
253
* Set response
254
254
*
255
255
* @param Response $response
256
- * @return Client
256
+ * @return $this
257
257
*/
258
258
public function setResponse (Response $ response )
259
259
{
@@ -308,7 +308,7 @@ public function getRedirectionsCount()
308
308
* Set Uri (to the request)
309
309
*
310
310
* @param string|Http $uri
311
- * @return Client
311
+ * @return $this
312
312
*/
313
313
public function setUri ($ uri )
314
314
{
@@ -356,7 +356,7 @@ public function getUri()
356
356
* Set the HTTP method (to the request)
357
357
*
358
358
* @param string $method
359
- * @return Client
359
+ * @return $this
360
360
*/
361
361
public function setMethod ($ method )
362
362
{
@@ -395,7 +395,7 @@ public function getMethod()
395
395
* Set the query string argument separator
396
396
*
397
397
* @param string $argSeparator
398
- * @return Client
398
+ * @return $this
399
399
*/
400
400
public function setArgSeparator ($ argSeparator )
401
401
{
@@ -423,7 +423,7 @@ public function getArgSeparator()
423
423
*
424
424
* @param string $encType
425
425
* @param string $boundary
426
- * @return Client
426
+ * @return $this
427
427
*/
428
428
public function setEncType ($ encType , $ boundary = null )
429
429
{
@@ -454,7 +454,7 @@ public function getEncType()
454
454
* Set raw body (for advanced use cases)
455
455
*
456
456
* @param string $body
457
- * @return Client
457
+ * @return $this
458
458
*/
459
459
public function setRawBody ($ body )
460
460
{
@@ -466,7 +466,7 @@ public function setRawBody($body)
466
466
* Set the POST parameters
467
467
*
468
468
* @param array $post
469
- * @return Client
469
+ * @return $this
470
470
*/
471
471
public function setParameterPost (array $ post )
472
472
{
@@ -478,7 +478,7 @@ public function setParameterPost(array $post)
478
478
* Set the GET parameters
479
479
*
480
480
* @param array $query
481
- * @return Client
481
+ * @return $this
482
482
*/
483
483
public function setParameterGet (array $ query )
484
484
{
@@ -491,7 +491,7 @@ public function setParameterGet(array $query)
491
491
*
492
492
* @param bool $clearCookies Also clear all valid cookies? (defaults to false)
493
493
* @param bool $clearAuth Also clear http authentication? (defaults to true)
494
- * @return Client
494
+ * @return $this
495
495
*/
496
496
public function resetParameters ($ clearCookies = false /*, $clearAuth = true */ )
497
497
{
@@ -559,7 +559,7 @@ protected function getCookieId($cookie)
559
559
* @param string $maxAge
560
560
* @param string $version
561
561
* @throws Exception\InvalidArgumentException
562
- * @return Client
562
+ * @return $this
563
563
*/
564
564
public function addCookie (
565
565
$ cookie ,
@@ -606,7 +606,7 @@ public function addCookie(
606
606
*
607
607
* @param array|SetCookie[] $cookies Cookies as name=>value pairs or instances of SetCookie.
608
608
* @throws Exception\InvalidArgumentException
609
- * @return Client
609
+ * @return $this
610
610
*/
611
611
public function setCookies ($ cookies )
612
612
{
@@ -638,7 +638,7 @@ public function clearCookies()
638
638
*
639
639
* @param Headers|array $headers
640
640
* @throws Exception\InvalidArgumentException
641
- * @return Client
641
+ * @return $this
642
642
*/
643
643
public function setHeaders ($ headers )
644
644
{
@@ -693,7 +693,7 @@ public function getHeader($name)
693
693
* Set streaming for received data
694
694
*
695
695
* @param string|bool $streamfile Stream file, true for temp file, false/null for no streaming
696
- * @return \Zend\Http\Client
696
+ * @return $this
697
697
*/
698
698
public function setStream ($ streamfile = true )
699
699
{
@@ -717,8 +717,8 @@ public function getStream()
717
717
/**
718
718
* Create temporary stream
719
719
*
720
- * @throws Exception\RuntimeException
721
720
* @return resource
721
+ * @throws Exception\RuntimeException
722
722
*/
723
723
protected function openTempStream ()
724
724
{
@@ -753,7 +753,7 @@ protected function openTempStream()
753
753
* @param string $password
754
754
* @param string $type
755
755
* @throws Exception\InvalidArgumentException
756
- * @return Client
756
+ * @return $this
757
757
*/
758
758
public function setAuth ($ user , $ password , $ type = self ::AUTH_BASIC )
759
759
{
@@ -865,7 +865,7 @@ public function dispatch(Stdlib\RequestInterface $request, Stdlib\ResponseInterf
865
865
/**
866
866
* Send HTTP request
867
867
*
868
- * @param Request $request
868
+ * @param Request|null $request
869
869
* @return Response
870
870
* @throws Exception\RuntimeException
871
871
* @throws Client\Exception\RuntimeException
@@ -1043,7 +1043,7 @@ public function send(Request $request = null)
1043
1043
/**
1044
1044
* Fully reset the HTTP client (auth, cookies, request, response, etc.)
1045
1045
*
1046
- * @return Client
1046
+ * @return $this
1047
1047
*/
1048
1048
public function reset ()
1049
1049
{
@@ -1071,7 +1071,7 @@ public function reset()
1071
1071
* @param string $data Data to send (if null, $filename is read and sent)
1072
1072
* @param string $ctype Content type to use (if $data is set and $ctype is
1073
1073
* null, will be application/octet-stream)
1074
- * @return Client
1074
+ * @return $this
1075
1075
* @throws Exception\RuntimeException
1076
1076
*/
1077
1077
public function setFileUpload ($ filename , $ formname , $ data = null , $ ctype = null )
@@ -1154,8 +1154,8 @@ protected function prepareCookies($domain, $path, $secure)
1154
1154
*
1155
1155
* @param resource|string $body
1156
1156
* @param Http $uri
1157
- * @throws Exception\RuntimeException
1158
1157
* @return array
1158
+ * @throws Exception\RuntimeException
1159
1159
*/
1160
1160
protected function prepareHeaders ($ body , $ uri )
1161
1161
{
@@ -1499,7 +1499,5 @@ public static function encodeAuthHeader($user, $password, $type = self::AUTH_BAS
1499
1499
$ type
1500
1500
));
1501
1501
}
1502
-
1503
- return ;
1504
1502
}
1505
1503
}
0 commit comments