/**
  * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
  * @return void
  */
 public function cleanupCommand()
 {
     $entriesToCleanUp = $this->entryRepository->findEntriesToCleanUp($this->configuration->get(System\Configuration::CONF_SECONDS_TILL_RESET), $this->configuration->get(System\Configuration::CONF_MAX_FAILURES), $this->configuration->get(System\Configuration::CONF_RESTRICTION_TIME));
     foreach ($entriesToCleanUp as $entryToCleanUp) {
         $this->entryRepository->remove($entryToCleanUp);
     }
     $this->persistenceManager->persistAll();
 }
 /**
  * Return clients IP address.
  *
  * @return string
  */
 private function getClientIp()
 {
     if ($this->configuration->getXForwardedFor() && isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
         return $_SERVER['HTTP_X_FORWARDED_FOR'];
     }
     return $_SERVER['REMOTE_ADDR'];
 }