Renamed countVisits to countNonOrphanVisits, and updated its signature to expect a VisitsCountFiltering DTO

This commit is contained in:
Alejandro Celaya
2022-01-16 11:15:39 +01:00
parent 60c0ca3ae5
commit 61618250ec
6 changed files with 14 additions and 12 deletions

View File

@@ -37,7 +37,7 @@ class VisitsStatsHelper implements VisitsStatsHelperInterface
$visitsRepo = $this->em->getRepository(Visit::class);
return new VisitsStats(
$visitsRepo->countVisits($apiKey),
$visitsRepo->countNonOrphanVisits(VisitsCountFiltering::withApiKey($apiKey)),
$visitsRepo->countOrphanVisits(new VisitsCountFiltering()),
);
}