Fix doc comments on get[General](Short|Long)Desc
[lhc/web/wiklou.git] / includes / Collation.php
index 4c85e52..71adb09 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 abstract class Collation {
-       static $instance;
+       private static $instance;
 
        /**
         * @return Collation
@@ -108,7 +108,8 @@ abstract class Collation {
 }
 
 class UppercaseCollation extends Collation {
-       var $lang;
+       private $lang;
+
        function __construct() {
                // Get a language object so that we can use the generic UTF-8 uppercase
                // function there
@@ -153,8 +154,20 @@ class IdentityCollation extends Collation {
 class IcuCollation extends Collation {
        const FIRST_LETTER_VERSION = 2;
 
-       var $primaryCollator, $mainCollator, $locale, $digitTransformLanguage;
-       var $firstLetterData;
+       /** @var Collator */
+       private $primaryCollator;
+
+       /** @var Collator */
+       private $mainCollator;
+
+       /** @var  */
+       private $locale;
+
+       /** @var Language */
+       protected $digitTransformLanguage;
+
+       /** @var array */
+       private $firstLetterData;
 
        /**
         * Unified CJK blocks.
@@ -165,7 +178,7 @@ class IcuCollation extends Collation {
         * is pretty useless for sorting Chinese text anyway. Japanese and Korean
         * blocks are not included here, because they are smaller and more useful.
         */
-       static $cjkBlocks = array(
+       private static $cjkBlocks = array(
                array( 0x2E80, 0x2EFF ), // CJK Radicals Supplement
                array( 0x2F00, 0x2FDF ), // Kangxi Radicals
                array( 0x2FF0, 0x2FFF ), // Ideographic Description Characters
@@ -204,7 +217,7 @@ class IcuCollation extends Collation {
         * Empty arrays are intended; this signifies that the data for the language is
         * available and that there are, in fact, no additional letters to consider.
         */
-       static $tailoringFirstLetters = array(
+       private static $tailoringFirstLetters = array(
                // Verified by native speakers
                'be' => array( "Ё" ),
                'be-tarask' => array( "Ё" ),
@@ -510,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] ) {