mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-14 18:23:52 -04:00
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user