Example #1
0
 /**
  * Removes failures older than 2 monthes
  */
 private function removeOldFailures()
 {
     $failures = $this->repository->findOldFailures('-2 months');
     if (0 < count($failures)) {
         foreach ($failures as $failure) {
             $this->em->remove($failure);
         }
     }
 }