summaryrefslogtreecommitdiff
path: root/app/Controllers/updateController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-12-31 17:00:51 +0100
committerGravatar GitHub <noreply@github.com> 2021-12-31 17:00:51 +0100
commit77e9877316fcfacb26799afdf32d94c8411da80e (patch)
tree7fd9c85bf4854054be6536c14d120bc8b790debe /app/Controllers/updateController.php
parent09c84fb3bc44bf8e45619c27acc15b967aea14ce (diff)
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
Diffstat (limited to 'app/Controllers/updateController.php')
-rw-r--r--app/Controllers/updateController.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php
index 862fb0cf9..16ab7e427 100644
--- a/app/Controllers/updateController.php
+++ b/app/Controllers/updateController.php
@@ -108,7 +108,7 @@ class FreshRSS_update_Controller extends Minz_ActionController {
}
public function indexAction() {
- Minz_View::prependTitle(_t('admin.update.title') . ' · ');
+ FreshRSS_View::prependTitle(_t('admin.update.title') . ' · ');
if (file_exists(UPDATE_FILENAME)) {
// There is an update file to apply!
@@ -224,6 +224,7 @@ class FreshRSS_update_Controller extends Minz_ActionController {
$res = !self::hasGitUpdate();
} else {
require(UPDATE_FILENAME);
+ // @phpstan-ignore-next-line
$res = do_post_update();
}
@@ -244,9 +245,12 @@ class FreshRSS_update_Controller extends Minz_ActionController {
} else {
require(UPDATE_FILENAME);
if (Minz_Request::isPost()) {
+ // @phpstan-ignore-next-line
save_info_update();
}
+ // @phpstan-ignore-next-line
if (!need_info_update()) {
+ // @phpstan-ignore-next-line
$res = apply_update();
} else {
return;
@@ -269,7 +273,7 @@ class FreshRSS_update_Controller extends Minz_ActionController {
* This action displays information about installation.
*/
public function checkInstallAction() {
- Minz_View::prependTitle(_t('admin.check_install.title') . ' · ');
+ FreshRSS_View::prependTitle(_t('admin.check_install.title') . ' · ');
$this->view->status_php = check_install_php();
$this->view->status_files = check_install_files();