Skip to content

Commit

Permalink
Fix errors spotted by psalm
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Aug 4, 2022
1 parent 0f9f3e1 commit 9d0014d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/CommandApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function getCommandName(InputInterface $input) {
/**
* 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
Expand Down
11 changes: 4 additions & 7 deletions lib/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,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');
}

/**
Expand Down Expand Up @@ -176,10 +174,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;
}

Expand Down Expand Up @@ -1048,7 +1045,7 @@ public function endStep($step) {
}

/**
* @return string
* @return array
* @throws \Exception
*/
public function currentStep() {
Expand Down

0 comments on commit 9d0014d

Please sign in to comment.