From: Bartosz DziewoƄski Date: Mon, 19 May 2014 16:21:08 +0000 (+0200) Subject: Collation: Remove deprecated findLowerBound() X-Git-Tag: 1.31.0-rc.0~15645^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_modifier.php?a=commitdiff_plain;h=944635524971ef0de5b357069d06967a55eafd6e;p=lhc%2Fweb%2Fwiklou.git Collation: Remove deprecated findLowerBound() It was just a wrapper for ArrayUtils::findLowerBound(), it's not used in core and it shouldn't be used anywhere outside of core (but I haven't checked). Change-Id: I53b0aca6bb642bdf6c972098170579fa13746554 --- diff --git a/includes/Collation.php b/includes/Collation.php index 4e0c6a47b7..71adb096cb 100644 --- a/includes/Collation.php +++ b/includes/Collation.php @@ -523,28 +523,6 @@ class IcuCollation extends Collation { return count( $this->firstLetterData['chars'] ); } - /** - * Do a binary search, and return the index of the largest item that sorts - * less than or equal to the target value. - * - * @deprecated since 1.23; use ArrayUtils::findLowerBound() instead - * - * @param array $valueCallback A function to call to get the value with - * a given array index. - * @param int $valueCount The number of items accessible via $valueCallback, - * indexed from 0 to $valueCount - 1 - * @param array $comparisonCallback A callback to compare two values, returning - * -1, 0 or 1 in the style of strcmp(). - * @param string $target The target value to find. - * - * @return int|bool The item index of the lower bound, or false if the target value - * sorts before all items. - */ - function findLowerBound( $valueCallback, $valueCount, $comparisonCallback, $target ) { - wfDeprecated( __METHOD__, '1.23' ); - return ArrayUtils::findLowerBound( $valueCallback, $valueCount, $comparisonCallback, $target ); - } - static function isCjk( $codepoint ) { foreach ( self::$cjkBlocks as $block ) { if ( $codepoint >= $block[0] && $codepoint <= $block[1] ) {