diff options
Diffstat (limited to 'modules-available/sysconfig/inc/configtgz.inc.php')
-rw-r--r-- | modules-available/sysconfig/inc/configtgz.inc.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/modules-available/sysconfig/inc/configtgz.inc.php b/modules-available/sysconfig/inc/configtgz.inc.php index 67e02503..9ab3ffd3 100644 --- a/modules-available/sysconfig/inc/configtgz.inc.php +++ b/modules-available/sysconfig/inc/configtgz.inc.php @@ -10,7 +10,6 @@ class ConfigTgz private function __construct() { - ; } public function id() @@ -134,7 +133,7 @@ class ConfigTgz return $task['id']; } - public function delete() + public function delete(): bool { if ($this->configId === 0) ErrorHandler::traceError('ConfigTgz::delete called with invalid config id!'); @@ -150,14 +149,14 @@ class ConfigTgz return $ret !== false; } - public function markOutdated() + public function markOutdated(): void { if ($this->configId === 0) ErrorHandler::traceError('ConfigTgz::markOutdated called with invalid config id!'); - return $this->mark('OUTDATED'); + $this->mark('OUTDATED'); } - private function markUpdated($task) + private function markUpdated($task): void { if ($this->configId === 0) ErrorHandler::traceError('ConfigTgz::markUpdated called with invalid config id!'); @@ -186,27 +185,28 @@ class ConfigTgz 'status' => 'OK', 'warnings' => $warnings, ]); - return 'OK'; + return; } - return $this->mark('OUTDATED'); + $this->mark('OUTDATED'); } - private function markFailed() + private function markFailed(): void { if ($this->configId === 0) ErrorHandler::traceError('ConfigTgz::markFailed called with invalid config id!'); - if ($this->file === false || !file_exists($this->file)) - return $this->mark('MISSING'); - return $this->mark('OUTDATED'); + if ($this->file === false || !file_exists($this->file)) { + $this->mark('MISSING'); + } else { + $this->mark('OUTDATED'); + } } - private function mark($status) + private function mark($status): void { Database::exec("UPDATE configtgz SET status = :status WHERE configid = :configid LIMIT 1", [ 'configid' => $this->configId, 'status' => $status, ]); - return $status; } /* |