Use proper types

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-04-11 00:20:15 +02:00
parent fd3c97b93b
commit a07f6d46e3
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 1 additions and 4 deletions

View File

@ -141,10 +141,7 @@ class LoginController extends Controller {
*
* @return TemplateResponse|RedirectResponse
*/
public function showLoginForm($user, $redirect_url) {
if (!is_string($user)) {
throw new \InvalidArgumentException('User needs to be string');
}
public function showLoginForm(string $user = null, string $redirect_url = null): Http\Response {
if ($this->userSession->isLoggedIn()) {
return new RedirectResponse(OC_Util::getDefaultPageUrl());