mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-18 21:34:35 -04:00
Add PHPStan (#4021)
* Add PHPStan #fix https://github.com/FreshRSS/FreshRSS/issues/4016 https://phpstan.org/ ```sh composer run-script phpstan ``` * More fixes * Fix global variables * Add .phtml * Fix merge https://github.com/FreshRSS/FreshRSS/pull/4090 * Fix more warnings * Fix view errors and enable in CI * ReturnTypeWillChange * Dynamic view type * Fix Minz static/self bug
This commit is contained in:
committed by
GitHub
parent
09c84fb3bc
commit
77e9877316
@@ -95,9 +95,9 @@ class FreshRSS_user_Controller extends Minz_ActionController {
|
||||
$this->view->disable_aside = true;
|
||||
}
|
||||
|
||||
Minz_View::prependTitle(_t('conf.profile.title') . ' · ');
|
||||
FreshRSS_View::prependTitle(_t('conf.profile.title') . ' · ');
|
||||
|
||||
Minz_View::appendScript(Minz_Url::display('/scripts/bcrypt.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/bcrypt.min.js')));
|
||||
FreshRSS_View::appendScript(Minz_Url::display('/scripts/bcrypt.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/bcrypt.min.js')));
|
||||
|
||||
if (Minz_Request::isPost()) {
|
||||
$system_conf = FreshRSS_Context::$system_conf;
|
||||
@@ -173,7 +173,7 @@ class FreshRSS_user_Controller extends Minz_ActionController {
|
||||
Minz_Error::error(403);
|
||||
}
|
||||
|
||||
Minz_View::prependTitle(_t('admin.user.title') . ' · ');
|
||||
FreshRSS_View::prependTitle(_t('admin.user.title') . ' · ');
|
||||
|
||||
if (Minz_Request::isPost()) {
|
||||
$action = Minz_Request::param('action');
|
||||
@@ -227,6 +227,7 @@ class FreshRSS_user_Controller extends Minz_ActionController {
|
||||
|
||||
$ok = self::checkUsername($new_user_name);
|
||||
$homeDir = join_path(DATA_PATH, 'users', $new_user_name);
|
||||
$configPath = '';
|
||||
|
||||
if ($ok) {
|
||||
$languages = Minz_Translate::availableLanguages();
|
||||
@@ -418,7 +419,7 @@ class FreshRSS_user_Controller extends Minz_ActionController {
|
||||
Minz_Error::error(404);
|
||||
}
|
||||
|
||||
Minz_View::prependTitle(_t('user.email.validation.title') . ' · ');
|
||||
FreshRSS_View::prependTitle(_t('user.email.validation.title') . ' · ');
|
||||
$this->view->_layout('simple');
|
||||
|
||||
$username = Minz_Request::param('username');
|
||||
@@ -429,11 +430,11 @@ class FreshRSS_user_Controller extends Minz_ActionController {
|
||||
} elseif (FreshRSS_Auth::hasAccess()) {
|
||||
$user_config = FreshRSS_Context::$user_conf;
|
||||
} else {
|
||||
Minz_Error::error(403);
|
||||
return Minz_Error::error(403);
|
||||
}
|
||||
|
||||
if (!FreshRSS_UserDAO::exists($username) || $user_config === null) {
|
||||
Minz_Error::error(404);
|
||||
return Minz_Error::error(404);
|
||||
}
|
||||
|
||||
if ($user_config->email_validation_token === '') {
|
||||
|
||||
Reference in New Issue
Block a user