public static function sendAutoReminder($tour, $tournament) { $users = UsersTournaments::getAutoReminderRecipients($tournament, $tour); if (!empty($users)) { return self::sendReminder($tour, $tournament, $users); } else { throw new ErrorException('Error sending reminders'); } }