From: Kunal Mehta Date: Fri, 9 Sep 2016 04:58:55 +0000 (-0700) Subject: Title: Document that Title::compare() can be used for LinkTargets X-Git-Tag: 1.31.0-rc.0~5686 X-Git-Url: https://git.cyclocoop.org/%20%27.%28%24debut%20%20%20%24par_page%29.%27?a=commitdiff_plain;h=5d52874ddf5e2d27e0f256033f3e90a676bf7169;p=lhc%2Fweb%2Fwiklou.git Title: Document that Title::compare() can be used for LinkTargets It only depends upon functions that are all in the LinkTarget interface. Change-Id: I95e598ea6014ced8f1b947c283dd0b542756b8e2 --- diff --git a/includes/Title.php b/includes/Title.php index 5e5a1b72b0..3475b26bbb 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -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 {