Title: Document that Title::compare() can be used for LinkTargets
authorKunal Mehta <legoktm@member.fsf.org>
Fri, 9 Sep 2016 04:58:55 +0000 (21:58 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Fri, 9 Sep 2016 04:58:55 +0000 (21:58 -0700)
It only depends upon functions that are all in the LinkTarget interface.

Change-Id: I95e598ea6014ced8f1b947c283dd0b542756b8e2

includes/Title.php

index 5e5a1b7..3475b26 100644 (file)
@@ -751,12 +751,12 @@ class Title implements LinkTarget {
        /**
         * Callback for usort() to do title sorts by (namespace, title)
         *
-        * @param Title $a
-        * @param Title $b
+        * @param LinkTarget $a
+        * @param LinkTarget $b
         *
         * @return int Result of string comparison, or namespace comparison
         */
-       public static function compare( $a, $b ) {
+       public static function compare( LinkTarget $a, LinkTarget $b ) {
                if ( $a->getNamespace() == $b->getNamespace() ) {
                        return strcmp( $a->getText(), $b->getText() );
                } else {