Use proper types
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
fd3c97b93b
commit
a07f6d46e3
|
@ -141,10 +141,7 @@ class LoginController extends Controller {
|
||||||
*
|
*
|
||||||
* @return TemplateResponse|RedirectResponse
|
* @return TemplateResponse|RedirectResponse
|
||||||
*/
|
*/
|
||||||
public function showLoginForm($user, $redirect_url) {
|
public function showLoginForm(string $user = null, string $redirect_url = null): Http\Response {
|
||||||
if (!is_string($user)) {
|
|
||||||
throw new \InvalidArgumentException('User needs to be string');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->userSession->isLoggedIn()) {
|
if ($this->userSession->isLoggedIn()) {
|
||||||
return new RedirectResponse(OC_Util::getDefaultPageUrl());
|
return new RedirectResponse(OC_Util::getDefaultPageUrl());
|
||||||
|
|
Loading…
Reference in New Issue