@@ -105,7 +105,7 @@ |
||
| 105 | 105 | * Set a default request option on the client that will be used as a default for each request |
| 106 | 106 | * |
| 107 | 107 | * @param string $keyOrPath request.options key (e.g. allow_redirects) or path to a nested key (e.g. headers/foo) |
| 108 | - * @param mixed $value Value to set |
|
| 108 | + * @param string|false $value Value to set |
|
| 109 | 109 | * |
| 110 | 110 | * @return $this |
| 111 | 111 | */ |
@@ -150,6 +150,9 @@ discard block |
||
| 150 | 150 | return $body->getContentMd5($rawOutput, $base64Encode); |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | + /** |
|
| 154 | + * @param string $streamFilterContentEncoding |
|
| 155 | + */ |
|
| 153 | 156 | public function setStreamFilterContentEncoding($streamFilterContentEncoding) |
| 154 | 157 | { |
| 155 | 158 | $this->contentEncoding = $streamFilterContentEncoding; |
@@ -165,6 +168,9 @@ discard block |
||
| 165 | 168 | )) ?: false; |
| 166 | 169 | } |
| 167 | 170 | |
| 171 | + /** |
|
| 172 | + * @param string $filter |
|
| 173 | + */ |
|
| 168 | 174 | protected function handleCompression($filter, $offsetStart = 0) |
| 169 | 175 | { |
| 170 | 176 | // @codeCoverageIgnoreStart |
@@ -25,6 +25,10 @@ |
||
| 25 | 25 | /** @var array POST files to send with the request */ |
| 26 | 26 | protected $postFiles = array(); |
| 27 | 27 | |
| 28 | + /** |
|
| 29 | + * @param string $method |
|
| 30 | + * @param string $url |
|
| 31 | + */ |
|
| 28 | 32 | public function __construct($method, $url, $headers = array()) |
| 29 | 33 | { |
| 30 | 34 | $this->postFields = new QueryString(); |
@@ -62,7 +62,6 @@ |
||
| 62 | 62 | /** |
| 63 | 63 | * Set the URL of the request |
| 64 | 64 | * |
| 65 | - * @param string $url|Url Full URL to set including query string |
|
| 66 | 65 | * |
| 67 | 66 | * @return self |
| 68 | 67 | */ |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | /** |
| 191 | 191 | * Set the response entity body |
| 192 | 192 | * |
| 193 | - * @param EntityBodyInterface|string $body Body to set |
|
| 193 | + * @param string $body Body to set |
|
| 194 | 194 | * |
| 195 | 195 | * @return self |
| 196 | 196 | */ |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | /** |
| 297 | 297 | * Get the response status code |
| 298 | 298 | * |
| 299 | - * @return integer |
|
| 299 | + * @return string |
|
| 300 | 300 | */ |
| 301 | 301 | public function getStatusCode() |
| 302 | 302 | { |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | /** |
| 378 | 378 | * Get the Age HTTP header |
| 379 | 379 | * |
| 380 | - * @return integer|null Returns the age the object has been in a proxy cache in seconds. |
|
| 380 | + * @return string Returns the age the object has been in a proxy cache in seconds. |
|
| 381 | 381 | */ |
| 382 | 382 | public function getAge() |
| 383 | 383 | { |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | /** |
| 388 | 388 | * Get the Allow HTTP header |
| 389 | 389 | * |
| 390 | - * @return string|null Returns valid actions for a specified resource. To be used for a 405 Method not allowed. |
|
| 390 | + * @return string Returns valid actions for a specified resource. To be used for a 405 Method not allowed. |
|
| 391 | 391 | */ |
| 392 | 392 | public function getAllow() |
| 393 | 393 | { |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | /** |
| 439 | 439 | * Get the Content-Encoding HTTP header |
| 440 | 440 | * |
| 441 | - * @return string|null |
|
| 441 | + * @return string |
|
| 442 | 442 | */ |
| 443 | 443 | public function getContentEncoding() |
| 444 | 444 | { |
@@ -448,7 +448,7 @@ discard block |
||
| 448 | 448 | /** |
| 449 | 449 | * Get the Content-Language HTTP header |
| 450 | 450 | * |
| 451 | - * @return string|null Returns the language the content is in. |
|
| 451 | + * @return string Returns the language the content is in. |
|
| 452 | 452 | */ |
| 453 | 453 | public function getContentLanguage() |
| 454 | 454 | { |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | /** |
| 469 | 469 | * Get the Content-Location HTTP header |
| 470 | 470 | * |
| 471 | - * @return string|null Returns an alternate location for the returned data (e.g /index.htm) |
|
| 471 | + * @return string Returns an alternate location for the returned data (e.g /index.htm) |
|
| 472 | 472 | */ |
| 473 | 473 | public function getContentLocation() |
| 474 | 474 | { |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | /** |
| 479 | 479 | * Get the Content-Disposition HTTP header |
| 480 | 480 | * |
| 481 | - * @return string|null Returns the Content-Disposition header |
|
| 481 | + * @return string Returns the Content-Disposition header |
|
| 482 | 482 | */ |
| 483 | 483 | public function getContentDisposition() |
| 484 | 484 | { |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | /** |
| 489 | 489 | * Get the Content-MD5 HTTP header |
| 490 | 490 | * |
| 491 | - * @return string|null Returns a Base64-encoded binary MD5 sum of the content of the response. |
|
| 491 | + * @return string Returns a Base64-encoded binary MD5 sum of the content of the response. |
|
| 492 | 492 | */ |
| 493 | 493 | public function getContentMd5() |
| 494 | 494 | { |
@@ -532,7 +532,7 @@ discard block |
||
| 532 | 532 | /** |
| 533 | 533 | * Get the Date HTTP header |
| 534 | 534 | * |
| 535 | - * @return string|null Returns the date and time that the message was sent. |
|
| 535 | + * @return string Returns the date and time that the message was sent. |
|
| 536 | 536 | */ |
| 537 | 537 | public function getDate() |
| 538 | 538 | { |
@@ -542,7 +542,7 @@ discard block |
||
| 542 | 542 | /** |
| 543 | 543 | * Get the ETag HTTP header |
| 544 | 544 | * |
| 545 | - * @return string|null Returns an identifier for a specific version of a resource, often a Message digest. |
|
| 545 | + * @return string Returns an identifier for a specific version of a resource, often a Message digest. |
|
| 546 | 546 | */ |
| 547 | 547 | public function getEtag() |
| 548 | 548 | { |
@@ -552,7 +552,7 @@ discard block |
||
| 552 | 552 | /** |
| 553 | 553 | * Get the Expires HTTP header |
| 554 | 554 | * |
| 555 | - * @return string|null Returns the date/time after which the response is considered stale. |
|
| 555 | + * @return string Returns the date/time after which the response is considered stale. |
|
| 556 | 556 | */ |
| 557 | 557 | public function getExpires() |
| 558 | 558 | { |
@@ -562,7 +562,7 @@ discard block |
||
| 562 | 562 | /** |
| 563 | 563 | * Get the Last-Modified HTTP header |
| 564 | 564 | * |
| 565 | - * @return string|null Returns the last modified date for the requested object, in RFC 2822 format |
|
| 565 | + * @return string Returns the last modified date for the requested object, in RFC 2822 format |
|
| 566 | 566 | * (e.g. Tue, 15 Nov 1994 12:45:26 GMT) |
| 567 | 567 | */ |
| 568 | 568 | public function getLastModified() |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | /** |
| 574 | 574 | * Get the Location HTTP header |
| 575 | 575 | * |
| 576 | - * @return string|null Used in redirection, or when a new resource has been created. |
|
| 576 | + * @return string Used in redirection, or when a new resource has been created. |
|
| 577 | 577 | */ |
| 578 | 578 | public function getLocation() |
| 579 | 579 | { |
@@ -583,7 +583,7 @@ discard block |
||
| 583 | 583 | /** |
| 584 | 584 | * Get the Pragma HTTP header |
| 585 | 585 | * |
| 586 | - * @return Header|null Returns the implementation-specific headers that may have various effects anywhere along |
|
| 586 | + * @return string Returns the implementation-specific headers that may have various effects anywhere along |
|
| 587 | 587 | * the request-response chain. |
| 588 | 588 | */ |
| 589 | 589 | public function getPragma() |
@@ -594,7 +594,7 @@ discard block |
||
| 594 | 594 | /** |
| 595 | 595 | * Get the Proxy-Authenticate HTTP header |
| 596 | 596 | * |
| 597 | - * @return string|null Authentication to access the proxy (e.g. Basic) |
|
| 597 | + * @return string Authentication to access the proxy (e.g. Basic) |
|
| 598 | 598 | */ |
| 599 | 599 | public function getProxyAuthenticate() |
| 600 | 600 | { |
@@ -604,7 +604,7 @@ discard block |
||
| 604 | 604 | /** |
| 605 | 605 | * Get the Retry-After HTTP header |
| 606 | 606 | * |
| 607 | - * @return int|null If an entity is temporarily unavailable, this instructs the client to try again after a |
|
| 607 | + * @return string If an entity is temporarily unavailable, this instructs the client to try again after a |
|
| 608 | 608 | * specified period of time. |
| 609 | 609 | */ |
| 610 | 610 | public function getRetryAfter() |
@@ -615,7 +615,7 @@ discard block |
||
| 615 | 615 | /** |
| 616 | 616 | * Get the Server HTTP header |
| 617 | 617 | * |
| 618 | - * @return string|null A name for the server |
|
| 618 | + * @return string A name for the server |
|
| 619 | 619 | */ |
| 620 | 620 | public function getServer() |
| 621 | 621 | { |
@@ -625,7 +625,7 @@ discard block |
||
| 625 | 625 | /** |
| 626 | 626 | * Get the Set-Cookie HTTP header |
| 627 | 627 | * |
| 628 | - * @return string|null An HTTP cookie. |
|
| 628 | + * @return string An HTTP cookie. |
|
| 629 | 629 | */ |
| 630 | 630 | public function getSetCookie() |
| 631 | 631 | { |
@@ -635,7 +635,7 @@ discard block |
||
| 635 | 635 | /** |
| 636 | 636 | * Get the Trailer HTTP header |
| 637 | 637 | * |
| 638 | - * @return string|null The Trailer general field value indicates that the given set of header fields is present in |
|
| 638 | + * @return string The Trailer general field value indicates that the given set of header fields is present in |
|
| 639 | 639 | * the trailer of a message encoded with chunked transfer-coding. |
| 640 | 640 | */ |
| 641 | 641 | public function getTrailer() |
@@ -646,7 +646,7 @@ discard block |
||
| 646 | 646 | /** |
| 647 | 647 | * Get the Transfer-Encoding HTTP header |
| 648 | 648 | * |
| 649 | - * @return string|null The form of encoding used to safely transfer the entity to the user |
|
| 649 | + * @return string The form of encoding used to safely transfer the entity to the user |
|
| 650 | 650 | */ |
| 651 | 651 | public function getTransferEncoding() |
| 652 | 652 | { |
@@ -656,7 +656,7 @@ discard block |
||
| 656 | 656 | /** |
| 657 | 657 | * Get the Vary HTTP header |
| 658 | 658 | * |
| 659 | - * @return string|null Tells downstream proxies how to match future request headers to decide whether the cached |
|
| 659 | + * @return string Tells downstream proxies how to match future request headers to decide whether the cached |
|
| 660 | 660 | * response can be used rather than requesting a fresh one from the origin server. |
| 661 | 661 | */ |
| 662 | 662 | public function getVary() |
@@ -667,7 +667,7 @@ discard block |
||
| 667 | 667 | /** |
| 668 | 668 | * Get the Via HTTP header |
| 669 | 669 | * |
| 670 | - * @return string|null Informs the client of proxies through which the response was sent. |
|
| 670 | + * @return string Informs the client of proxies through which the response was sent. |
|
| 671 | 671 | */ |
| 672 | 672 | public function getVia() |
| 673 | 673 | { |
@@ -677,7 +677,7 @@ discard block |
||
| 677 | 677 | /** |
| 678 | 678 | * Get the Warning HTTP header |
| 679 | 679 | * |
| 680 | - * @return string|null A general warning about possible problems with the entity body |
|
| 680 | + * @return string A general warning about possible problems with the entity body |
|
| 681 | 681 | */ |
| 682 | 682 | public function getWarning() |
| 683 | 683 | { |
@@ -687,7 +687,7 @@ discard block |
||
| 687 | 687 | /** |
| 688 | 688 | * Get the WWW-Authenticate HTTP header |
| 689 | 689 | * |
| 690 | - * @return string|null Indicates the authentication scheme that should be used to access the requested entity |
|
| 690 | + * @return string Indicates the authentication scheme that should be used to access the requested entity |
|
| 691 | 691 | */ |
| 692 | 692 | public function getWwwAuthenticate() |
| 693 | 693 | { |
@@ -811,7 +811,7 @@ discard block |
||
| 811 | 811 | * A response is considered fresh when its age is less than or equal to the freshness lifetime (maximum age) of the |
| 812 | 812 | * response. |
| 813 | 813 | * |
| 814 | - * @return bool|null |
|
| 814 | + * @return boolean |
|
| 815 | 815 | */ |
| 816 | 816 | public function isFresh() |
| 817 | 817 | { |
@@ -129,7 +129,7 @@ |
||
| 129 | 129 | * |
| 130 | 130 | * One of: false, "RFC 3986", or "application/x-www-form-urlencoded" |
| 131 | 131 | * |
| 132 | - * @return bool|string |
|
| 132 | + * @return boolean |
|
| 133 | 133 | */ |
| 134 | 134 | public function getUrlEncoding() |
| 135 | 135 | { |
@@ -2,8 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Guzzle\Http; |
| 4 | 4 | |
| 5 | -use Guzzle\Stream\StreamInterface; |
|
| 6 | - |
|
| 7 | 5 | /** |
| 8 | 6 | * EntityBody decorator used to return only a subset of an entity body |
| 9 | 7 | */ |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | * @param string $password Password of the URL |
| 117 | 117 | * @param int $port Port of the URL |
| 118 | 118 | * @param string $path Path of the URL |
| 119 | - * @param QueryString|array|string $query Query string of the URL |
|
| 119 | + * @param QueryString $query Query string of the URL |
|
| 120 | 120 | * @param string $fragment Fragment of the URL |
| 121 | 121 | */ |
| 122 | 122 | public function __construct($scheme, $host, $username = null, $password = null, $port = null, $path = null, QueryString $query = null, $fragment = null) |
@@ -543,6 +543,9 @@ discard block |
||
| 543 | 543 | return $this; |
| 544 | 544 | } |
| 545 | 545 | |
| 546 | + /** |
|
| 547 | + * @param boolean $strictRfc386 |
|
| 548 | + */ |
|
| 546 | 549 | private function addQuery(QueryString $new, $strictRfc386) |
| 547 | 550 | { |
| 548 | 551 | if (!$strictRfc386) { |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | protected $defaultTtl; |
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | - * @param mixed $cache Cache used to store cache data |
|
| 28 | + * @param CacheAdapterInterface $cache Cache used to store cache data |
|
| 29 | 29 | * @param string $keyPrefix Provide an optional key prefix to prefix on all cache keys |
| 30 | 30 | * @param int $defaultTtl Default cache TTL |
| 31 | 31 | */ |