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

Commit 951098f

Browse files
committed
move assignment outside if
1 parent 427e54e commit 951098f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Client.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,11 @@ public function setUri($uri)
325325
}
326326

327327
$uri = $this->getUri();
328+
$user = $uri->getUser();
329+
$password = $uri->getPassword();
328330

329331
// Set auth if username and password has been specified in the uri
330-
if (($user = $uri->getUser()) && ($password = $uri->getPassword())) {
332+
if ($user && $password) {
331333
$this->setAuth($user, $password);
332334
}
333335

0 commit comments

Comments
 (0)