Skip to content

Commit

Permalink
Update Quote provider list command:
Browse files Browse the repository at this point in the history
- add checkbox column
  • Loading branch information
webeweb committed May 10, 2024
1 parent d5540f4 commit 8f0fc48
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/common/Command/QuoteProviderListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ protected function getHeaders(): array {
$this->translate("command.header.domain", [], null, "en"),
$this->translate("command.header.authors", [], null, "en"),
$this->translate("command.header.quotes", [], null, "en"),
"",
];
}

Expand All @@ -127,11 +128,14 @@ protected function renderRow(QuoteProviderInterface $provider): array {
"%{$length[1]}d",
];

$quotes = count($provider->getQuotes());

return [
get_class($provider),
$provider->getDomain(),
sprintf($format[0], count($provider->getAuthors())),
sprintf($format[1], count($provider->getQuotes())),
sprintf($format[1], $quotes),
static::formatCheckbox(365 === $quotes),
];
}
}

0 comments on commit 8f0fc48

Please sign in to comment.