/**
  * Sort the entries in reverse date order
  *
  * @param \PodcastSite\Entity\Episode $a
  * @param \PodcastSite\Entity\Episode $b
  * @return int
  */
 public function __invoke(Episode $a, Episode $b)
 {
     if ($a->getPublishDate() == $b->getPublishDate()) {
         return 0;
     }
     return $a->getPublishDate() > $b->getPublishDate() ? -1 : 1;
 }
 /**
  * Sort the entries in reverse date order
  *
  * @param \PodcastSite\Entity\Episode $a
  * @param \PodcastSite\Entity\Episode $b
  * @return int
  */
 public function __invoke(Episode $a, Episode $b)
 {
     $firstDate = new \DateTime($a->getPublishDate());
     $secondDate = new \DateTime($b->getPublishDate());
     if ($firstDate == $secondDate) {
         return 0;
     }
     return $firstDate > $secondDate ? -1 : 1;
 }