configProvider = $configProvider; $this->logEntryRepository = $logEntryRepository; $this->loginAttemptRepository = $loginAttemptRepository; $this->visitHistoryEntryRepository = $visitHistoryEntryRepository; } public function execute() { if ($this->configProvider->isNeedCleanActionsLog()) { $this->logEntryRepository->clean($this->configProvider->getActionsLogPeriod()); } if ($this->configProvider->isNeedCleanLoginAttemptsLog()) { //TODO: replace to LoginAttemptsManager->clear() $this->loginAttemptRepository->clean($this->configProvider->getLoginAttemptsLogPeriod()); } if ($this->configProvider->isNeedCleanVisitHistoryLog()) { //TODO: replace to VisitHistoryManager->clear() $this->visitHistoryEntryRepository->clean($this->configProvider->getVisitHistoryLogPeriod()); } } }