/** * Check if $institution is of type SINGLE_CENTER * * @param Mixed <Institution, array> $institution * @return boolean */ public function isSingleCenter(Institution $institution) { if ($institution instanceof Institution) { $type = $institution->getType(); } else { $type = $institution['type']; } return InstitutionTypes::SINGLE_CENTER == $type; }