Skip to content

Commit

Permalink
fix psalm and linting issues
Browse files Browse the repository at this point in the history
Signed-off-by: Marvin Winkens <[email protected]>
  • Loading branch information
mwinkens committed Nov 11, 2024
1 parent 38cb99d commit 998ce10
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/Command/GetFree.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$total_quota = $this->quotaManager->getGroupQuota($groupId);
if ($total_quota === FileInfo::SPACE_UNLIMITED) {
if ($input->getOption('format')) {
$total_quota = $total_quota === FileInfo::SPACE_UNLIMITED ? 'Unlimited' : \OC_Helper::humanFileSize($total_quota);
}
$output->writeln($total_quota);
}
else {
$output->writeln($input->getOption('format') ? 'Unlimited' : FileInfo::SPACE_UNLIMITED);
} else {
$used = $this->usedSpaceCalculator->getUsedSpaceByGroup($group);
$free = $total_quota - $used;
$output->writeln($input->getOption('format') ? \OC_Helper::humanFileSize($free) : $free);
Expand Down

0 comments on commit 998ce10

Please sign in to comment.