/** * @param Firm $firm * @param Episode $episode * * @return bool */ public function canEditEpisode(Firm $firm, Episode $episode) { if ($episode->legacy) { return false; } if ($episode->support_services) { return $firm->isSupportServicesFirm(); } return $firm->getSubspecialtyID() === $episode->getSubspecialtyID(); }