diff --git a/src/Client.php b/src/Client.php index 1881aa089d..5d5bb43797 100644 --- a/src/Client.php +++ b/src/Client.php @@ -319,7 +319,7 @@ public function setUri($uri) /** * Get uri (from the request) * - * @return Zend\Uri\Http + * @return Http */ public function getUri() { @@ -449,13 +449,14 @@ protected function getCookieId($cookie) * * @param array|ArrayIterator|Header\SetCookie|string $cookie * @param string $value - * @param string $version - * @param string $maxAge - * @param string $domain * @param string $expire * @param string $path + * @param string $domain * @param boolean $secure * @param boolean $httponly + * @param string $maxAge + * @param string $version + * @throws Exception\InvalidArgumentException * @return Client */ public function addCookie($cookie, $value = null, $expire = null, $path = null, $domain = null, $secure = false, $httponly = true, $maxAge = null, $version = null) @@ -483,6 +484,7 @@ public function addCookie($cookie, $value = null, $expire = null, $path = null, * Set an array of cookies * * @param array $cookies + * @throws Exception\InvalidArgumentException * @return Client */ public function setCookies($cookies) @@ -510,6 +512,7 @@ public function clearCookies() * Set the headers (for the request) * * @param Headers|array $headers + * @throws Exception\InvalidArgumentException * @return Client */ public function setHeaders($headers) @@ -585,6 +588,7 @@ public function getStream() /** * Create temporary stream * + * @throws Exception\RuntimeException * @return resource */ protected function openTempStream() @@ -619,6 +623,7 @@ protected function openTempStream() * @param string $user * @param string $password * @param string $type + * @throws Exception\InvalidArgumentException * @return Client */ public function setAuth($user, $password, $type = self::AUTH_BASIC) @@ -648,6 +653,8 @@ public function setAuth($user, $password, $type = self::AUTH_BASIC) * @param string $password * @param string $type * @param array $digest + * @param null|string $entityBody + * @throws Exception\InvalidArgumentException * @return string|boolean */ protected function calcAuthDigest($user, $password, $type = self::AUTH_BASIC, $digest = array(), $entityBody = null) @@ -737,6 +744,7 @@ public function dispatch(Stdlib\RequestInterface $request, Stdlib\ResponseInterf * @param Request $request * @return Response * @throws Exception\RuntimeException + * @throws Client\Exception\RuntimeException */ public function send(Request $request = null) { @@ -970,8 +978,8 @@ public function removeFileUpload($filename) /** * Prepare Cookies * - * @param string $uri * @param string $domain + * @param string $path * @param boolean $secure * @return Header\Cookie|boolean */ @@ -1002,6 +1010,9 @@ protected function prepareCookies($domain, $path, $secure) /** * Prepare the request headers * + * @param resource|string $body + * @param Http $uri + * @throws Exception\RuntimeException * @return array */ protected function prepareHeaders($body, $uri) @@ -1125,7 +1136,7 @@ protected function prepareBody() } // Encode files - foreach ($this->getRequest()->getFiles()->toArray() as $key => $file) { + foreach ($this->getRequest()->getFiles()->toArray() as $file) { $fhead = array('Content-Type' => $file['ctype']); $body .= $this->encodeFormData($boundary, $file['formname'], $file['data'], $file['filename'], $fhead); } diff --git a/src/Client/Adapter/Curl.php b/src/Client/Adapter/Curl.php index fe133e24c1..222598cf24 100644 --- a/src/Client/Adapter/Curl.php +++ b/src/Client/Adapter/Curl.php @@ -125,7 +125,7 @@ public function setOptions($options = array()) } if (isset($options['proxyuser']) && isset($options['proxypass'])) { - $this->setCurlOption(CURLOPT_PROXYUSERPWD, $options['proxyuser'].":".$options['proxypass']); + $this->setCurlOption(CURLOPT_PROXYUSERPWD, $options['proxyuser'] . ":" . $options['proxypass']); unset($options['proxyuser'], $options['proxypass']); } @@ -213,7 +213,7 @@ public function connect($host, $port = 80, $secure = false) if (!$this->curl) { $this->close(); - throw new AdapterException\RuntimeException('Unable to Connect to ' . $host . ':' . $port); + throw new AdapterException\RuntimeException('Unable to Connect to ' . $host . ':' . $port); } if ($secure !== false) { @@ -240,6 +240,7 @@ public function connect($host, $port = 80, $secure = false) * @param string $body * @return string $request * @throws AdapterException\RuntimeException If connection fails, connected to wrong host, no PUT file defined, unsupported method, or unsupported cURL option + * @throws AdapterException\InvalidArgumentException if $method is currently not supported */ public function write($method, $uri, $httpVersion = 1.1, $headers = array(), $body = '') { diff --git a/src/Client/Adapter/Proxy.php b/src/Client/Adapter/Proxy.php index de82c642fe..195718bdae 100644 --- a/src/Client/Adapter/Proxy.php +++ b/src/Client/Adapter/Proxy.php @@ -96,6 +96,7 @@ public function connect($host, $port = 80, $secure = false) * @param string $http_ver * @param array $headers * @param string $body + * @throws AdapterException\RuntimeException * @return string Request as string */ public function write($method, $uri, $http_ver = '1.1', $headers = array(), $body = '') @@ -179,6 +180,7 @@ public function write($method, $uri, $http_ver = '1.1', $headers = array(), $bod * @param integer $port * @param string $http_ver * @param array $headers + * @throws AdapterException\RuntimeException */ protected function connectHandshake($host, $port = 443, $http_ver = '1.1', array &$headers = array()) { diff --git a/src/Client/Adapter/Socket.php b/src/Client/Adapter/Socket.php index 0f407520eb..764171891a 100644 --- a/src/Client/Adapter/Socket.php +++ b/src/Client/Adapter/Socket.php @@ -102,6 +102,7 @@ public function __construct() * Set the configuration array for the adapter * * @param array|Traversable $options + * @throws AdapterException\InvalidArgumentException */ public function setOptions($options = array()) { @@ -140,6 +141,7 @@ public function getConfig() * @since Zend Framework 1.9 * * @param mixed $context Stream context or array of context options + * @throws Exception\InvalidArgumentException * @return Socket */ public function setStreamContext($context) @@ -252,7 +254,7 @@ public function connect($host, $port = 80, $secure = false) 'Unable to connect to %s:%d%s', $host, $port, - ($error ? '. Error #' . $error->getCode() . ': ' . $error->getMessage() : '') + ($error ? ' . Error #' . $error->getCode() . ': ' . $error->getMessage() : '') ), 0, $error @@ -319,6 +321,7 @@ public function connect($host, $port = 80, $secure = false) * @param string $http_ver * @param array $headers * @param string $body + * @throws AdapterException\RuntimeException * @return string Request as string */ public function write($method, $uri, $http_ver = '1.1', $headers = array(), $body = '') @@ -373,6 +376,7 @@ public function write($method, $uri, $http_ver = '1.1', $headers = array(), $bod /** * Read response from server * + * @throws AdapterException\RuntimeException * @return string */ public function read() diff --git a/src/Client/Adapter/Test.php b/src/Client/Adapter/Test.php index c3cec6dd76..de8aaf389a 100644 --- a/src/Client/Adapter/Test.php +++ b/src/Client/Adapter/Test.php @@ -80,6 +80,7 @@ public function setNextRequestWillFail($flag) * Set the configuration array for the adapter * * @param array|Traversable $options + * @throws Exception\InvalidArgumentException */ public function setOptions($options = array()) { @@ -189,7 +190,7 @@ public function setResponse($response) /** * Add another response to the response buffer. * - * @param string \Zend\Http\Response|$response + * @param string|Response $response */ public function addResponse($response) { @@ -205,6 +206,7 @@ public function addResponse($response) * response will be returned on the next call to read(). * * @param integer $index + * @throws Exception\OutOfRangeException */ public function setResponseIndex($index) { diff --git a/src/Client/Cookies.php b/src/Client/Cookies.php index cc1cb1dfe5..8b22c14e5c 100644 --- a/src/Client/Cookies.php +++ b/src/Client/Cookies.php @@ -13,7 +13,6 @@ use ArrayIterator; use Zend\Http\Header\Cookie; use Zend\Http\Response; -use Zend\Stdlib\ParametersInterface; use Zend\Uri; /** @@ -96,6 +95,7 @@ public function __construct() * * @param Cookie|string $cookie * @param Uri\Uri|string $ref_uri Optional reference URI (for domain, path, secure) + * @throws Exception\InvalidArgumentException if invalid $cookie value */ public function addCookie($cookie, $ref_uri = null) { @@ -159,6 +159,7 @@ public function getAllCookies($ret_as = self::COOKIE_OBJECT) * @param boolean $matchSessionCookies Whether to send session cookies * @param int $ret_as Whether to return cookies as objects of \Zend\Http\Header\Cookie or as strings * @param int $now Override the current time when checking for expiry time + * @throws Exception\InvalidArgumentException if invalid URI * @return array|string */ public function getMatchingCookies($uri, $matchSessionCookies = true, @@ -198,6 +199,7 @@ public function getMatchingCookies($uri, $matchSessionCookies = true, * @param Uri\Uri|string $uri The uri (domain and path) to match * @param string $cookie_name The cookie's name * @param int $ret_as Whether to return cookies as objects of \Zend\Http\Header\Cookie or as strings + * @throws Exception\InvalidArgumentException if invalid URI specified or invalid $ret_as value * @return Cookie|string */ public function getCookie($uri, $cookie_name, $ret_as = self::COOKIE_OBJECT) @@ -302,7 +304,7 @@ protected function _matchDomain($domain) /** * Return a subset of a domain-matching cookies that also match a specified path * - * @param array $dom_array + * @param array $domains * @param string $path * @return array */ diff --git a/src/ClientStatic.php b/src/ClientStatic.php index 43b2a5e8a5..18f0d31b8e 100644 --- a/src/ClientStatic.php +++ b/src/ClientStatic.php @@ -26,7 +26,7 @@ class ClientStatic /** * Get the static HTTP client * - * @return Zend\Http\Client + * @return Client */ protected static function getStaticClient() { @@ -42,9 +42,10 @@ protected static function getStaticClient() * @param string $url * @param array $query * @param array $headers + * @param mixed $body * @return Response|boolean */ - public static function get($url, $query=array(), $headers=array(), $body=null) + public static function get($url, $query = array(), $headers = array(), $body = null) { if (empty($url)) { return false; @@ -68,15 +69,18 @@ public static function get($url, $query=array(), $headers=array(), $body=null) return self::getStaticClient()->send($request); } + /** * HTTP POST METHOD (static) * * @param string $url * @param array $params * @param array $headers + * @param mixed $body + * @throws Exception\InvalidArgumentException * @return Response|boolean */ - public static function post($url, $params, $headers=array(), $body=null) + public static function post($url, $params, $headers = array(), $body = null) { if (empty($url)) { return false; diff --git a/src/Cookies.php b/src/Cookies.php index 5af04e5a67..8fbde32474 100644 --- a/src/Cookies.php +++ b/src/Cookies.php @@ -38,12 +38,12 @@ class Cookies extends Headers { /** - * @var Headers + * @var \Zend\Http\Headers */ protected $headers = null; /** - * @var $_rawCookies + * @var array */ protected $rawCookies; @@ -73,6 +73,7 @@ public function __construct(Headers $headers, $context = self::CONTEXT_REQUEST) * * @param Cookie|string $cookie * @param Uri\Uri|string $ref_uri Optional reference URI (for domain, path, secure) + * @throws Exception\InvalidArgumentException */ public function addCookie(Cookie $cookie, $ref_uri = null) { @@ -136,6 +137,7 @@ public function getAllCookies($ret_as = self::COOKIE_OBJECT) * @param boolean $matchSessionCookies Whether to send session cookies * @param int $ret_as Whether to return cookies as objects of \Zend\Http\Header\Cookie or as strings * @param int $now Override the current time when checking for expiry time + * @throws Exception\InvalidArgumentException if invalid URI specified * @return array|string */ public function getMatchingCookies($uri, $matchSessionCookies = true, @@ -175,6 +177,7 @@ public function getMatchingCookies($uri, $matchSessionCookies = true, * @param Uri\Uri|string $uri The uri (domain and path) to match * @param string $cookie_name The cookie's name * @param int $ret_as Whether to return cookies as objects of \Zend\Http\Header\Cookie or as strings + * @throws Exception\InvalidArgumentException if invalid URI specified or invalid $ret_as value * @return Cookie|string */ public function getCookie($uri, $cookie_name, $ret_as = self::COOKIE_OBJECT) @@ -279,7 +282,7 @@ protected function _matchDomain($domain) /** * Return a subset of a domain-matching cookies that also match a specified path * - * @param array $dom_array + * @param array $domains * @param string $path * @return array */ @@ -309,7 +312,7 @@ protected function _matchPath($domains, $path) * of the cookie. * * @param Response $response HTTP Response object - * @param Uri\Uri|string $uri The requested URI + * @param Uri\Uri|string $ref_uri The requested URI * @return Cookies * @todo Add the $uri functionality. */ diff --git a/src/Header/AbstractAccept.php b/src/Header/AbstractAccept.php index cb57231754..ebbc7996f3 100644 --- a/src/Header/AbstractAccept.php +++ b/src/Header/AbstractAccept.php @@ -10,6 +10,8 @@ namespace Zend\Http\Header; +use stdClass; + /** * Abstract Accept Header * @@ -118,7 +120,7 @@ public function getFieldValuePartsFromHeaderLine($headerLine) * Parse the accept params belonging to a media range * * @param string $fieldValuePart - * @return StdClass + * @return stdClass */ protected function parseFieldValuePart($fieldValuePart) { @@ -184,6 +186,7 @@ protected function getParametersFromFieldValuePart($fieldValuePart) /** * Get field value * + * @param array|null $values * @return string */ public function getFieldValue($values = null) @@ -207,9 +210,9 @@ public function getFieldValue($values = null) * Assemble and escape the field value parameters based on RFC 2616 section 2.1 * * @todo someone should review this thoroughly - * @param string value + * @param string $value * @param string $key - * @return void + * @return string */ protected function assembleAcceptParam(&$value, $key) { @@ -236,6 +239,7 @@ function($v) { return '\\' . $v[0]; }, * @param string $type * @param int|float $priority * @param array (optional) $params + * @throws Exception\InvalidArgumentException * @return Accept */ protected function addType($type, $priority = 1, array $params = array()) @@ -275,7 +279,7 @@ protected function addType($type, $priority = 1, array $params = array()) /** * Does the header have the requested type? * - * @param string $type + * @param array|string $matchAgainst * @return bool */ protected function hasType($matchAgainst) @@ -367,7 +371,7 @@ protected function matchAcceptParams($match1, $match2) /** * Add a key/value combination to the internal queue * - * @param unknown_type $value + * @param stdClass $value * @return number */ protected function addFieldValuePartToQueue($value) diff --git a/src/Header/Accept.php b/src/Header/Accept.php index e11b62e334..71c8bc7acb 100644 --- a/src/Header/Accept.php +++ b/src/Header/Accept.php @@ -48,7 +48,7 @@ public function toString() * * @param string $type * @param int|float $priority - * @param int $level + * @param array $params * @return Accept */ public function addMediaType($type, $priority = 1, array $params = array()) @@ -70,7 +70,7 @@ public function hasMediaType($type) /** * Parse the keys contained in the header line * - * @param string mediaType + * @param string $fieldValuePart * @return \Zend\Http\Header\Accept\FieldValuePart\CharsetFieldValuePart * @see \Zend\Http\Header\AbstractAccept::parseFieldValuePart() */ diff --git a/src/Header/Accept/FieldValuePart/AbstractFieldValuePart.php b/src/Header/Accept/FieldValuePart/AbstractFieldValuePart.php index 706a6b7155..79baaafbd9 100644 --- a/src/Header/Accept/FieldValuePart/AbstractFieldValuePart.php +++ b/src/Header/Accept/FieldValuePart/AbstractFieldValuePart.php @@ -62,7 +62,7 @@ public function getPriority() } /** - * @return StdClass $params + * @return \stdClass $params */ public function getParams() { diff --git a/src/Header/AcceptCharset.php b/src/Header/AcceptCharset.php index 20a6ccedbe..0df8f4a70a 100644 --- a/src/Header/AcceptCharset.php +++ b/src/Header/AcceptCharset.php @@ -68,7 +68,7 @@ public function hasCharset($type) /** * Parse the keys contained in the header line * - * @param string mediaType + * @param string $fieldValuePart * @return \Zend\Http\Header\Accept\FieldValuePart\CharsetFieldValuePart * @see \Zend\Http\Header\AbstractAccept::parseFieldValuePart() */ diff --git a/src/Header/AcceptEncoding.php b/src/Header/AcceptEncoding.php index eb79680e5f..51506fdcc7 100644 --- a/src/Header/AcceptEncoding.php +++ b/src/Header/AcceptEncoding.php @@ -69,7 +69,7 @@ public function hasEncoding($type) /** * Parse the keys contained in the header line * - * @param string mediaType + * @param string $fieldValuePart * @return \Zend\Http\Header\Accept\FieldValuePart\EncodingFieldValuePart * @see \Zend\Http\Header\AbstractAccept::parseFieldValuePart() */ diff --git a/src/Header/AcceptLanguage.php b/src/Header/AcceptLanguage.php index 8e91a66d6a..79f3d5180b 100644 --- a/src/Header/AcceptLanguage.php +++ b/src/Header/AcceptLanguage.php @@ -70,7 +70,7 @@ public function hasLanguage($type) /** * Parse the keys contained in the header line * - * @param string mediaType + * @param string $fieldValuePart * @return \Zend\Http\Header\Accept\FieldValuePart\LanguageFieldValuePart * @see \Zend\Http\Header\AbstractAccept::parseFieldValuePart() */ diff --git a/src/Header/CacheControl.php b/src/Header/CacheControl.php index 24e5a275ca..34ecdd59d0 100644 --- a/src/Header/CacheControl.php +++ b/src/Header/CacheControl.php @@ -131,7 +131,7 @@ public function getFieldValue() $parts[] = $key; } else { if (preg_match('#[^a-zA-Z0-9._-]#', $value)) { - $value = '"'.$value.'"'; + $value = '"' . $value.'"'; } $parts[] = "$key=$value"; } @@ -228,7 +228,7 @@ protected static function parseValue($value) protected static function match($tokens, &$string, &$lastMatch) { foreach ($tokens as $i => $token) { - if (preg_match('/^'.$token.'/', $string, $matches)) { + if (preg_match('/^' . $token . '/', $string, $matches)) { $lastMatch = $matches[0]; $string = substr($string, strlen($matches[0])); return $i; diff --git a/src/Header/GenericMultiHeader.php b/src/Header/GenericMultiHeader.php index 844279bc7d..e5524282cf 100644 --- a/src/Header/GenericMultiHeader.php +++ b/src/Header/GenericMultiHeader.php @@ -38,6 +38,6 @@ public function toStringMultipleHeaders(array $headers) } $values[] = $header->getFieldValue(); } - return $name. ': ' . implode(',', $values) . "\r\n"; + return $name . ': ' . implode(',', $values) . "\r\n"; } } diff --git a/src/Header/SetCookie.php b/src/Header/SetCookie.php index 4c55022b92..bb31a02fb1 100644 --- a/src/Header/SetCookie.php +++ b/src/Header/SetCookie.php @@ -10,6 +10,8 @@ namespace Zend\Http\Header; +use Closure; + /** * @throws Exception\InvalidArgumentException * @see http://www.ietf.org/rfc/rfc2109.txt @@ -270,6 +272,7 @@ public function getFieldValue() /** * @param string $name + * @throws Exception\InvalidArgumentException * @return SetCookie */ public function setName($name) @@ -310,6 +313,7 @@ public function getValue() * Set version * * @param integer $version + * @throws Exception\InvalidArgumentException */ public function setVersion($version) { @@ -333,6 +337,7 @@ public function getVersion() * Set Max-Age * * @param integer $maxAge + * @throws Exception\InvalidArgumentException */ public function setMaxAge($maxAge) { @@ -354,6 +359,7 @@ public function getMaxAge() /** * @param int $expires + * @throws Exception\InvalidArgumentException * @return SetCookie */ public function setExpires($expires) @@ -370,6 +376,7 @@ public function setExpires($expires) } /** + * @param bool $inSeconds * @return int */ public function getExpires($inSeconds = false) diff --git a/src/Headers.php b/src/Headers.php index d293f0a908..3ac50a6e22 100644 --- a/src/Headers.php +++ b/src/Headers.php @@ -264,17 +264,17 @@ public function get($name) $headers[] = $this->headers[$index]; } return new ArrayIterator($headers); - } else { - $index = array_search($key, $this->headersKeys); - if ($index === false) { - return false; - } - if (is_array($this->headers[$index])) { - return $this->lazyLoadHeader($index); - } else { - return $this->headers[$index]; - } } + + $index = array_search($key, $this->headersKeys); + if ($index === false) { + return false; + } + + if (is_array($this->headers[$index])) { + return $this->lazyLoadHeader($index); + } + return $this->headers[$index]; } /** @@ -441,11 +441,10 @@ protected function lazyLoadHeader($index) $this->headers[] = $header; } return $current; - } else { - $this->headers[$index] = $current = $headers; - return $current; } + $this->headers[$index] = $current = $headers; + return $current; } /** diff --git a/src/Response.php b/src/Response.php index 9ab7636af9..539af7f7e2 100644 --- a/src/Response.php +++ b/src/Response.php @@ -511,8 +511,7 @@ protected function decodeDeflate($body) if ($zlibHeader[1] % 31 == 0) { return gzuncompress($body); - } else { - return gzinflate($body); } + return gzinflate($body); } } diff --git a/test/Client/StaticClientTest.php b/test/Client/StaticClientTest.php index 9dfa6ba2ec..4df3472195 100644 --- a/test/Client/StaticClientTest.php +++ b/test/Client/StaticClientTest.php @@ -66,7 +66,7 @@ public function testHttpGetWithParamsInUri() { $response= HTTPClient::get($this->baseuri . 'testGetData.php?foo'); $this->assertTrue($response->isSuccess()); - $this->assertContains('foo',$response->getBody()); + $this->assertContains('foo', $response->getBody()); } /** @@ -76,8 +76,8 @@ public function testHttpMultiGetWithParam() { $response= HTTPClient::get($this->baseuri . 'testGetData.php',array('foo' => 'bar')); $this->assertTrue($response->isSuccess()); - $this->assertContains('foo',$response->getBody()); - $this->assertContains('bar',$response->getBody()); + $this->assertContains('foo', $response->getBody()); + $this->assertContains('bar', $response->getBody()); } /** @@ -87,8 +87,8 @@ public function testHttpSimplePost() { $response= HTTPClient::post($this->baseuri . 'testPostData.php',array('foo' => 'bar')); $this->assertTrue($response->isSuccess()); - $this->assertContains('foo',$response->getBody()); - $this->assertContains('bar',$response->getBody()); + $this->assertContains('foo', $response->getBody()); + $this->assertContains('bar', $response->getBody()); } /** @@ -100,8 +100,8 @@ public function testHttpPostContentType() array('foo' => 'bar'), array('Content-Type' => Client::ENC_URLENCODED)); $this->assertTrue($response->isSuccess()); - $this->assertContains('foo',$response->getBody()); - $this->assertContains('bar',$response->getBody()); + $this->assertContains('foo', $response->getBody()); + $this->assertContains('bar', $response->getBody()); } /** diff --git a/test/Header/AcceptTest.php b/test/Header/AcceptTest.php index c22605b9c3..c050f588b7 100644 --- a/test/Header/AcceptTest.php +++ b/test/Header/AcceptTest.php @@ -190,7 +190,7 @@ public function testParsingAndAssemblingQuotedStrings() . chr(22).'3\"";level="foo;, bar", text/json;level=1, text/xml;level=2;q=0.4'; $acceptHeader = Accept::fromString($acceptStr); - $this->assertEquals($acceptStr, $acceptHeader->getFieldName().': '.$acceptHeader->getFieldValue()); + $this->assertEquals($acceptStr, $acceptHeader->getFieldName().': ' . $acceptHeader->getFieldValue()); } diff --git a/test/Response/ResponseStreamTest.php b/test/Response/ResponseStreamTest.php index 3a05a2afc0..5b180851ee 100644 --- a/test/Response/ResponseStreamTest.php +++ b/test/Response/ResponseStreamTest.php @@ -53,7 +53,7 @@ public function testGzipResponse () public function test300isRedirect() { $values = $this->readResponse('response_302'); - $response = Stream::fromStream($values['data'],$values['stream']); + $response = Stream::fromStream($values['data'], $values['stream']); $this->assertEquals(302, $response->getStatusCode(), 'Response code is expected to be 302, but it\'s not.'); $this->assertFalse($response->isClientError(), 'Response is an error, but isClientError() returned true'); @@ -70,7 +70,7 @@ public function test300isRedirect() public function testMultilineHeader() { $values = $this->readResponse('response_multiline_header'); - $response = Stream::fromStream($values['data'],$values['stream']); + $response = Stream::fromStream($values['data'], $values['stream']); // Make sure we got the corrent no. of headers $this->assertEquals(6, count($response->getHeaders()), 'Header count is expected to be 6');