mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-09 01:44:31 +02:00
Fixed some issues detected by PHPstan.
This commit is contained in:
parent
f2ff77a8b3
commit
dd1f806c4e
30 changed files with 310 additions and 45 deletions
|
@ -68,7 +68,7 @@ class UpdateExchangeRatesCommand extends Command
|
|||
null);
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): void
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
|
||||
|
@ -76,7 +76,7 @@ class UpdateExchangeRatesCommand extends Command
|
|||
if (3 !== strlen($this->base_current)) {
|
||||
$io->error('Choosen Base current is not valid. Check your settings!');
|
||||
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
|
||||
$io->note('Update currency exchange rates with base currency: '.$this->base_current);
|
||||
|
@ -121,5 +121,6 @@ class UpdateExchangeRatesCommand extends Command
|
|||
$this->em->flush();
|
||||
|
||||
$io->success(sprintf('%d (of %d) currency exchange rates were updated.', $success_counter, count($candidates)));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue