From 5d52874ddf5e2d27e0f256033f3e90a676bf7169 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 8 Sep 2016 21:58:55 -0700 Subject: [PATCH] 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 --- includes/Title.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 { -- 2.20.1