From 5ad89371ed04d5d73e59f2c3e18a8562edb8e6ef Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 9 Mar 2018 08:52:14 +0100 Subject: [PATCH] Make ChangePasswordController strict Signed-off-by: Roeland Jago Douma --- .../Controller/ChangePasswordController.php | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/settings/Controller/ChangePasswordController.php b/settings/Controller/ChangePasswordController.php index 31ff8904ce..208178d567 100644 --- a/settings/Controller/ChangePasswordController.php +++ b/settings/Controller/ChangePasswordController.php @@ -1,4 +1,5 @@ userManager->checkPassword($this->userId, $oldpassword); if ($user === false) { @@ -148,7 +137,7 @@ class ChangePasswordController extends Controller { * * @return JSONResponse */ - public function changeUserPassword($username = null, $password = null, $recoveryPassword = null) { + public function changeUserPassword(string $username = null, string $password = null, string $recoveryPassword = null): JSONResponse { if ($username === null) { return new JSONResponse([ 'status' => 'error',