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

Commit

Permalink
Resolved merge conflict in Zend\GData\AuthSub
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanDotPro committed Jun 12, 2012
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
13 changes: 3 additions & 10 deletions src/Client/Cookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,8 @@ public function addCookie($cookie, $ref_uri = null)
* @param Response $response
* @param Uri\Uri|string $ref_uri Requested URI
*/
public function addCookiesFromResponse($response, $ref_uri)
public function addCookiesFromResponse(Response $response, $ref_uri)
{
if (!$response instanceof Response) {
throw new Exception\InvalidArgumentException('$response is expected to be a Response object');
}

$cookie_hdrs = $response->headers()->get('Set-Cookie');

if (is_array($cookie_hdrs)) {
Expand Down Expand Up @@ -182,8 +178,7 @@ public function getMatchingCookies($uri, $matchSessionCookies = true,
{
if (is_string($uri)) {
$uri = Uri\UriFactory::factory($uri, 'http');
}
if (!$uri instanceof Uri\Uri) {
} elseif (!$uri instanceof Uri\Uri) {
throw new Exception\InvalidArgumentException("Invalid URI string or object passed");
}

Expand Down Expand Up @@ -221,9 +216,7 @@ public function getCookie($uri, $cookie_name, $ret_as = self::COOKIE_OBJECT)
{
if (is_string($uri)) {
$uri = Uri\UriFactory::factory($uri, 'http');
}

if (!$uri instanceof Uri\Uri) {
} elseif (!$uri instanceof Uri\Uri) {
throw new Exception\InvalidArgumentException('Invalid URI specified');
}

Expand Down
13 changes: 3 additions & 10 deletions src/Cookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,8 @@ public function addCookie(Cookie $cookie, $ref_uri = null)
* @param Response $response
* @param Uri\Uri|string $ref_uri Requested URI
*/
public function addCookiesFromResponse($response, $ref_uri)
public function addCookiesFromResponse(Response $response, $ref_uri)
{
if (!$response instanceof Response) {
throw new Exception\InvalidArgumentException('$response is expected to be a Response object');
}

$cookie_hdrs = $response->headers()->get('Set-Cookie');

if (is_array($cookie_hdrs)) {
Expand Down Expand Up @@ -185,8 +181,7 @@ public function getMatchingCookies($uri, $matchSessionCookies = true,
{
if (is_string($uri)) {
$uri = Uri\UriFactory::factory($uri, 'http');
}
if (!$uri instanceof Uri\Uri) {
} elseif (!$uri instanceof Uri\Uri) {
throw new Exception\InvalidArgumentException("Invalid URI string or object passed");
}

Expand Down Expand Up @@ -224,9 +219,7 @@ public function getCookie($uri, $cookie_name, $ret_as = self::COOKIE_OBJECT)
{
if (is_string($uri)) {
$uri = Uri\UriFactory::factory($uri, 'http');
}

if (!$uri instanceof Uri\Uri) {
} elseif (!$uri instanceof Uri\Uri) {
throw new Exception\InvalidArgumentException('Invalid URI specified');
}

Expand Down

0 comments on commit 7432649

Please sign in to comment.