Replace "URI->setQueryParams()" after initialization with a constructor argument

Summary: Ref T13250. See D20149. In a number of cases, we use `setQueryParams()` immediately after URI construction. To simplify this slightly, let the constructor take parameters, similar to `HTTPSFuture`.

Test Plan: See inlines.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13250

Differential Revision: https://secure.phabricator.com/D20151
This commit is contained in:
epriestley
2019-02-12 10:45:33 -08:00
parent eb73cb68ff
commit 4c12420162
13 changed files with 83 additions and 92 deletions

View File

@@ -218,11 +218,11 @@ final class PhabricatorAuthOneTimeLoginController
$request->setTemporaryCookie(PhabricatorCookies::COOKIE_HISEC, 'yes');
return (string)id(new PhutilURI($panel_uri))
->setQueryParams(
array(
'key' => $key,
));
$params = array(
'key' => $key,
);
return (string)new PhutilURI($panel_uri, $params);
}
$providers = id(new PhabricatorAuthProviderConfigQuery())