aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/updateController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers/updateController.php')
-rw-r--r--app/Controllers/updateController.php15
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();