diff options
| author | 2023-04-05 23:26:38 +0200 | |
|---|---|---|
| committer | 2023-04-05 23:26:38 +0200 | |
| commit | 2118448133e327294ad2b69ed8736bc29879103d (patch) | |
| tree | 00c003056dedbd8e3554801d6493a25641a260a5 /app/Controllers/updateController.php | |
| parent | 4f078958b5603900592e14f9f3189bbebfc81bab (diff) | |
PHPStan level 6 for more files (#5264)
7 more files passing (see phpstan-next.txt)
Diffstat (limited to 'app/Controllers/updateController.php')
| -rw-r--r-- | app/Controllers/updateController.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index 82ccd20c9..742806ba3 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -4,14 +4,14 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController { const LASTUPDATEFILE = 'last_update.txt'; - public static function isGit() { + public static function isGit(): bool { return is_dir(FRESHRSS_PATH . '/.git/'); } /** * Automatic change to the new name of edge branch since FreshRSS 1.18.0. */ - public static function migrateToGitEdge() { + public static function migrateToGitEdge(): bool { $errorMessage = 'Error during git checkout to edge branch. Please change branch manually!'; if (!is_writable(FRESHRSS_PATH . '/.git/config')) { @@ -44,7 +44,7 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController { return true; } - public static function hasGitUpdate() { + public static function hasGitUpdate(): bool { $cwd = getcwd(); chdir(FRESHRSS_PATH); $output = array(); @@ -66,6 +66,7 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController { strpos($line, '[behind') !== false || strpos($line, '[ahead') !== false || strpos($line, '[gone') !== false; } + /** @return string|true */ public static function gitPull() { $cwd = getcwd(); chdir(FRESHRSS_PATH); @@ -109,7 +110,7 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController { } } - public function indexAction() { + public function indexAction(): void { FreshRSS_View::prependTitle(_t('admin.update.title') . ' · '); if (file_exists(UPDATE_FILENAME)) { @@ -135,7 +136,7 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController { } } - public function checkAction() { + public function checkAction(): void { $this->view->_path('update/index.phtml'); if (file_exists(UPDATE_FILENAME)) { @@ -216,7 +217,7 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController { } } - public function applyAction() { + public function applyAction(): void { if (FreshRSS_Context::$system_conf->disable_update || !file_exists(UPDATE_FILENAME) || !touch(FRESHRSS_PATH . '/index.html')) { Minz_Request::forward(array('c' => 'update'), true); } @@ -278,7 +279,7 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController { /** * This action displays information about installation. */ - public function checkInstallAction() { + public function checkInstallAction(): void { FreshRSS_View::prependTitle(_t('admin.check_install.title') . ' · '); $this->view->status_php = check_install_php(); |
