/**
  * @param PerformanceEvent $performanceEvent
  * @return bool
  */
 protected function isMoreThanMax(PerformanceEvent $performanceEvent)
 {
     $from = clone $performanceEvent->getDateTime();
     $from->setTime(00, 00, 00);
     $to = clone $performanceEvent->getDateTime();
     $to->setTime(23, 59, 59);
     $countPerformanceEventsPerDate = count($this->repository->findByDateRangeAndSlug($from, $to));
     if ($performanceEvent->getId()) {
         return $countPerformanceEventsPerDate >= self::MAX_PERFORMANCE_EVENTS_PER_ONE_DAY + 1;
     } else {
         return $countPerformanceEventsPerDate >= self::MAX_PERFORMANCE_EVENTS_PER_ONE_DAY;
     }
 }