diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-08-04 11:52:25 +0300 |
---|---|---|
committer | Côme Chilliet (Rebase PR Action) <come-nc@users.noreply.github.com> | 2022-08-23 19:04:27 +0300 |
commit | 5c22c17f842ab42b246e666ac22dcf1685943143 (patch) | |
tree | 1e3152e3e5c2cab3b3d24b88651accec816f0ab6 | |
parent | 842b2f39d516e0aca4c2b8b1503b3dd568ba2548 (diff) |
Fix errors spotted by psalm
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | lib/CommandApplication.php | 2 | ||||
-rw-r--r-- | lib/Updater.php | 11 |
2 files changed, 5 insertions, 8 deletions
diff --git a/lib/CommandApplication.php b/lib/CommandApplication.php index e79e6fd..e1ad2de 100644 --- a/lib/CommandApplication.php +++ b/lib/CommandApplication.php @@ -47,7 +47,7 @@ class CommandApplication extends Application { /** * Gets the default commands that should always be available. * - * @return array An array of default Command instances + * @return \Symfony\Component\Console\Command\Command[] An array of default Command instances */ protected function getDefaultCommands() { // Keep the core default commands to have the HelpCommand diff --git a/lib/Updater.php b/lib/Updater.php index cee8188..ddec987 100644 --- a/lib/Updater.php +++ b/lib/Updater.php @@ -121,11 +121,9 @@ class Updater { /** * 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'); } /** @@ -176,10 +174,9 @@ class Updater { /** * 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; } @@ -1048,7 +1045,7 @@ EOF; } /** - * @return string + * @return array * @throws \Exception */ public function currentStep() { |