Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request zendframework/zendframework#2101 from pborreli/typos
Browse files Browse the repository at this point in the history
Fixed few typos
  • Loading branch information
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public function setOptions($options = array())
* Load the connection adapter
*
* While this method is not called more than one for a client, it is
* seperated from ->request() to preserve logic and readability
* separated from ->request() to preserve logic and readability
*
* @param Client\Adapter\AdapterInterface|string $adapter
* @return Client
Expand Down
2 changes: 1 addition & 1 deletion src/Client/Adapter/StreamInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* An interface description for Zend_Http_Client_Adapter_Stream classes.
*
* This interface decribes Zend_Http_Client_Adapter which supports streaming.
* This interface describes Zend_Http_Client_Adapter which supports streaming.
*
* @category Zend
* @package Zend_Http
Expand Down
2 changes: 1 addition & 1 deletion src/Client/Adapter/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Test implements AdapterInterface
protected $responseIndex = 0;

/**
* Wether or not the next request will fail with an exception
* Whether or not the next request will fail with an exception
*
* @var boolean
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Client/Cookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function getMatchingCookies($uri, $matchSessionCookies = true,
$cookies = $this->_matchPath($cookies, $uri->getPath());
$cookies = $this->_flattenCookiesArray($cookies, self::COOKIE_OBJECT);

// Next, run Cookie->match on all cookies to check secure, time and session mathcing
// Next, run Cookie->match on all cookies to check secure, time and session matching
$ret = array();
foreach ($cookies as $cookie)
if ($cookie->match($uri, $matchSessionCookies, $now))
Expand Down Expand Up @@ -241,7 +241,7 @@ public function getCookie($uri, $cookie_name, $ret_as = self::COOKIE_OBJECT)
}

/**
* Helper function to recursivly flatten an array. Shoud be used when exporting the
* Helper function to recursively flatten an array. Should be used when exporting the
* cookies array (or parts of it)
*
* @param \Zend\Http\Header\Cookie|array $ptr
Expand Down
4 changes: 2 additions & 2 deletions src/Cookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function getMatchingCookies($uri, $matchSessionCookies = true,
$cookies = $this->_matchPath($cookies, $uri->getPath());
$cookies = $this->_flattenCookiesArray($cookies, self::COOKIE_OBJECT);

// Next, run Cookie->match on all cookies to check secure, time and session mathcing
// Next, run Cookie->match on all cookies to check secure, time and session matching
$ret = array();
foreach ($cookies as $cookie)
if ($cookie->match($uri, $matchSessionCookies, $now))
Expand Down Expand Up @@ -218,7 +218,7 @@ public function getCookie($uri, $cookie_name, $ret_as = self::COOKIE_OBJECT)
}

/**
* Helper function to recursivly flatten an array. Shoud be used when exporting the
* Helper function to recursively flatten an array. Should be used when exporting the
* cookies array (or parts of it)
*
* @param \Zend\Http\Header\Cookie|array $ptr
Expand Down
2 changes: 1 addition & 1 deletion src/Header/AbstractAccept.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public function getFieldValue($values = null)


/**
* Assemble and escape the field value parameters based on RFC 2616 secion 2.1
* Assemble and escape the field value parameters based on RFC 2616 section 2.1
*
* @todo someone should review this thoroughly
* @param string value
Expand Down
2 changes: 1 addition & 1 deletion src/Header/CacheControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function removeDirective($key)
}

/**
* Assembles the directives into a comma-delimeted string
* Assembles the directives into a comma-delimited string
*
* @return string
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Header/SetCookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public static function fromString($headerLine, $bypassHeaderFieldName = false)
continue;
}

// Process the remanining elements
// Process the remaining elements
switch (str_replace(array('-', '_'), '', strtolower($headerKey))) {
case 'expires' : $header->setExpires($headerValue); break;
case 'domain' : $header->setDomain($headerValue); break;
Expand Down
2 changes: 1 addition & 1 deletion src/Headers.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public function next()
}

/**
* Return the current key for this object as an interator
* Return the current key for this object as an iterator
*
* @return mixed
*/
Expand Down
8 changes: 4 additions & 4 deletions src/Response/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Stream extends Response
/**
* Get the response as stream
*
* @return resourse
* @return resource
*/
public function getStream()
{
Expand All @@ -72,7 +72,7 @@ public function getStream()
/**
* Set the response stream
*
* @param resourse $stream
* @param resource $stream
* @return Stream
*/
public function setStream($stream)
Expand Down Expand Up @@ -204,7 +204,7 @@ public static function fromStream($responseString, $stream)
* should be in it's readable version - that is, after decoding it (if it
* was decoded), deflating it (if it was gzip compressed), etc.
*
* If you want to get the raw body (as transfered on wire) use
* If you want to get the raw body (as transferred on wire) use
* $this->getRawBody() instead.
*
* @return string
Expand All @@ -218,7 +218,7 @@ public function getBody()
}

/**
* Get the raw response body (as transfered "on wire") as string
* Get the raw response body (as transferred "on wire") as string
*
* If the body is encoded (with Transfer-Encoding, not content-encoding -
* IE "chunked" body), gzip compressed, etc. it will not be decoded.
Expand Down
8 changes: 4 additions & 4 deletions test/Client/CommonHttpTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -587,12 +587,12 @@ public function testHttpAuthBasic()
// First - fail password
$this->client->setAuth('alice', 'wrong');
$res = $this->client->send();
$this->assertEquals(401, $res->getStatusCode(), 'Expected HTTP 401 response was not recieved');
$this->assertEquals(401, $res->getStatusCode(), 'Expected HTTP 401 response was not received');

// Now use good password
$this->client->setAuth('alice', 'secret');
$res = $this->client->send();
$this->assertEquals(200, $res->getStatusCode(), 'Expected HTTP 200 response was not recieved');
$this->assertEquals(200, $res->getStatusCode(), 'Expected HTTP 200 response was not received');
}

/**
Expand All @@ -614,13 +614,13 @@ public function testHttpAuthBasicWithCredentialsInUri()
$this->client->setUri(sprintf($uri, 'alice', 'wrong'));
$this->client->setMethod('GET');
$res = $this->client->send();
$this->assertEquals(401, $res->getStatusCode(), 'Expected HTTP 401 response was not recieved');
$this->assertEquals(401, $res->getStatusCode(), 'Expected HTTP 401 response was not received');

// Now use good password
$this->client->setUri(sprintf($uri, 'alice', 'secret'));
$this->client->setMethod('GET');
$res = $this->client->send();
$this->assertEquals(200, $res->getStatusCode(), 'Expected HTTP 200 response was not recieved');
$this->assertEquals(200, $res->getStatusCode(), 'Expected HTTP 200 response was not received');
}

/**
Expand Down

0 comments on commit 00f4506

Please sign in to comment.