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

Commit 7432649

Browse files
committed
Resolved merge conflict in Zend\GData\AuthSub
24 parents 85c9491 + 8ec8384 + 004366f + 55a086d + ac7c7af + f02a226 + 00c4ac3 + 3f52720 + 5508474 + 49ed2f6 + d562686 + 67b42b2 + bdb1dae + 9809630 + 7304e37 + 752a5af + 8181c8f + 53bdac2 + c2f9414 + f6341e9 + 57cde95 + c750616 + 293054e + cdc376e commit 7432649

File tree

2 files changed

+6
-20
lines changed

2 files changed

+6
-20
lines changed

src/Client/Cookies.php

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,8 @@ public function addCookie($cookie, $ref_uri = null)
137137
* @param Response $response
138138
* @param Uri\Uri|string $ref_uri Requested URI
139139
*/
140-
public function addCookiesFromResponse($response, $ref_uri)
140+
public function addCookiesFromResponse(Response $response, $ref_uri)
141141
{
142-
if (!$response instanceof Response) {
143-
throw new Exception\InvalidArgumentException('$response is expected to be a Response object');
144-
}
145-
146142
$cookie_hdrs = $response->headers()->get('Set-Cookie');
147143

148144
if (is_array($cookie_hdrs)) {
@@ -182,8 +178,7 @@ public function getMatchingCookies($uri, $matchSessionCookies = true,
182178
{
183179
if (is_string($uri)) {
184180
$uri = Uri\UriFactory::factory($uri, 'http');
185-
}
186-
if (!$uri instanceof Uri\Uri) {
181+
} elseif (!$uri instanceof Uri\Uri) {
187182
throw new Exception\InvalidArgumentException("Invalid URI string or object passed");
188183
}
189184

@@ -221,9 +216,7 @@ public function getCookie($uri, $cookie_name, $ret_as = self::COOKIE_OBJECT)
221216
{
222217
if (is_string($uri)) {
223218
$uri = Uri\UriFactory::factory($uri, 'http');
224-
}
225-
226-
if (!$uri instanceof Uri\Uri) {
219+
} elseif (!$uri instanceof Uri\Uri) {
227220
throw new Exception\InvalidArgumentException('Invalid URI specified');
228221
}
229222

src/Cookies.php

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,8 @@ public function addCookie(Cookie $cookie, $ref_uri = null)
140140
* @param Response $response
141141
* @param Uri\Uri|string $ref_uri Requested URI
142142
*/
143-
public function addCookiesFromResponse($response, $ref_uri)
143+
public function addCookiesFromResponse(Response $response, $ref_uri)
144144
{
145-
if (!$response instanceof Response) {
146-
throw new Exception\InvalidArgumentException('$response is expected to be a Response object');
147-
}
148-
149145
$cookie_hdrs = $response->headers()->get('Set-Cookie');
150146

151147
if (is_array($cookie_hdrs)) {
@@ -185,8 +181,7 @@ public function getMatchingCookies($uri, $matchSessionCookies = true,
185181
{
186182
if (is_string($uri)) {
187183
$uri = Uri\UriFactory::factory($uri, 'http');
188-
}
189-
if (!$uri instanceof Uri\Uri) {
184+
} elseif (!$uri instanceof Uri\Uri) {
190185
throw new Exception\InvalidArgumentException("Invalid URI string or object passed");
191186
}
192187

@@ -224,9 +219,7 @@ public function getCookie($uri, $cookie_name, $ret_as = self::COOKIE_OBJECT)
224219
{
225220
if (is_string($uri)) {
226221
$uri = Uri\UriFactory::factory($uri, 'http');
227-
}
228-
229-
if (!$uri instanceof Uri\Uri) {
222+
} elseif (!$uri instanceof Uri\Uri) {
230223
throw new Exception\InvalidArgumentException('Invalid URI specified');
231224
}
232225

0 commit comments

Comments
 (0)