code: private function nullDateIfLowerThanToday(\DateTime $eda = null)
      {
          if (null === $eda) {
              return null;
          }
  
          $today = new \DateTime();
          $today->setTime(0, 0, 0);
  
          if ($eda < $today) {
              return null;
          }
  
          return $eda;
      }
docs: Returns the given date or null if it's lower than today.
  
  @param \DateTime|null $eda
  
  @return \DateTime|null