From f039ecf6f1ce3e5154f62ff823f9a81c89829b57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 25 Aug 2022 10:40:56 +0200 Subject: [PATCH] Update index.php from lib/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- index.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/index.php b/index.php index 68e0b788..4c4acef2 100644 --- a/index.php +++ b/index.php @@ -151,11 +151,9 @@ public function getCurrentVersion() { /** * Returns currently used release channel - * - * @return string */ - private function getCurrentReleaseChannel() { - return !is_null($this->getConfigOption('updater.release.channel')) ? $this->getConfigOption('updater.release.channel') : 'stable'; + private function getCurrentReleaseChannel(): string { + return (string)($this->getConfigOption('updater.release.channel') ?? 'stable'); } /** @@ -206,10 +204,9 @@ public function updateAvailable() { /** * Returns the specified config options * - * @param string $key * @return mixed|null Null if the entry is not found */ - public function getConfigOption($key) { + public function getConfigOption(string $key) { return isset($this->configValues[$key]) ? $this->configValues[$key] : null; } @@ -1078,7 +1075,7 @@ public function endStep($step) { } /** - * @return string + * @return array * @throws \Exception */ public function currentStep() {