Refactor
This commit is contained in:
parent
b8c3f6d9a7
commit
8c354f2754
3 changed files with 20 additions and 21 deletions
|
@ -6,12 +6,12 @@ namespace Drupal\opd_presentations;
|
|||
|
||||
use Drupal\opd_presentations\Repository\PresentationRepositoryInterface;
|
||||
|
||||
final class PresentationCounter {
|
||||
final class CountGivenPresentations {
|
||||
|
||||
public function __construct(private PresentationRepositoryInterface $presentationRepository) {
|
||||
}
|
||||
|
||||
public function getPastCount(): int {
|
||||
public function __invoke(): int {
|
||||
$presentations = $this->presentationRepository->getPublished();
|
||||
|
||||
return array_reduce(
|
Loading…
Add table
Add a link
Reference in a new issue