diff options
| author | 2023-03-21 18:57:57 +0100 | |
|---|---|---|
| committer | 2023-03-21 18:57:57 +0100 | |
| commit | 247215ffaa2966919115f283fb67a0096df8dc1c (patch) | |
| tree | 16ff9d0ec502bd95f0a1e2d6b49f853cf963e804 /app/Controllers/apiController.php | |
| parent | e679d3df0e55530c056d701b4773ff7e74f5c82c (diff) | |
Typehint some Controllers (#5106)
* Typehint to Controllers
* Remarque's from Alkarex
* Remarque's from Alkarex
* Remarque's from Alkarex
* Remarque's from Alkarex
* Remarque's from Alkarex
* Remarque's from Alkarex
---------
Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
Diffstat (limited to 'app/Controllers/apiController.php')
| -rw-r--r-- | app/Controllers/apiController.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/Controllers/apiController.php b/app/Controllers/apiController.php index 7843a33f1..ba3f76869 100644 --- a/app/Controllers/apiController.php +++ b/app/Controllers/apiController.php @@ -8,8 +8,9 @@ class FreshRSS_api_Controller extends FreshRSS_ActionController { /** * Update the user API password. * Return an error message, or `false` if no error. + * @return false|string */ - public static function updatePassword($apiPasswordPlain) { + public static function updatePassword(string $apiPasswordPlain) { $username = Minz_Session::param('currentUser'); $userConfig = FreshRSS_Context::$user_conf; @@ -35,12 +36,12 @@ class FreshRSS_api_Controller extends FreshRSS_ActionController { * Parameter is: * - apiPasswordPlain: the new user password */ - public function updatePasswordAction() { + public function updatePasswordAction(): void { if (!FreshRSS_Auth::hasAccess()) { Minz_Error::error(403); } - $return_url = array('c' => 'user', 'a' => 'profile'); + $return_url = ['c' => 'user', 'a' => 'profile']; if (!Minz_Request::isPost()) { Minz_Request::forward($return_url, true); |
