/** * Compares by rank order, highest first. Used for sort functions. * @param core_media_player $a Player A * @param core_media_player $b Player B * @return int Negative if A should go before B, positive for vice versa */ public static function compare_by_rank(core_media_player $a, core_media_player $b) { return $b->get_rank() - $a->get_rank(); }
/** * Compares by rank order, highest first. Used for sort functions. * @deprecated since Moodle 3.2 * @param core_media_player $a Player A * @param core_media_player $b Player B * @return int Negative if A should go before B, positive for vice versa */ public static function compare_by_rank(core_media_player $a, core_media_player $b) { debugging('Function core_media_player::compare_by_rank() is deprecated without replacement', DEBUG_DEVELOPER); return $b->get_rank() - $a->get_rank(); }