From: gladoscc Date: Thu, 1 Jan 2015 10:49:05 +0000 (+1100) Subject: Add type hinting for WikiPage::onArticleEdit, etc X-Git-Tag: 1.31.0-rc.0~12774 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=f652b4b7a99c560e1e7b5cba7401b182b7996fb4;p=lhc%2Fweb%2Fwiklou.git Add type hinting for WikiPage::onArticleEdit, etc Type hinting will catch false & null as specified in the todo. Change-Id: I64fade3a7aa5e15323dc63a13d84d969d0b942b3 --- diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index dcebe54216..7de7f27750 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -3156,7 +3156,7 @@ class WikiPage implements Page, IDBAccessObject { * * @param Title $title */ - public static function onArticleCreate( $title ) { + public static function onArticleCreate( Title $title ) { // Update existence markers on article/talk tabs... $other = $title->getOtherPage(); @@ -3173,7 +3173,7 @@ class WikiPage implements Page, IDBAccessObject { * * @param Title $title */ - public static function onArticleDelete( $title ) { + public static function onArticleDelete( Title $title ) { // Update existence markers on article/talk tabs... $other = $title->getOtherPage(); @@ -3214,10 +3214,8 @@ class WikiPage implements Page, IDBAccessObject { * Purge caches on page update etc * * @param Title $title - * @todo Verify that $title is always a Title object (and never false or - * null), add Title hint to parameter $title. */ - public static function onArticleEdit( $title ) { + public static function onArticleEdit( Title $title ) { // Invalidate caches of articles which include this page DeferredUpdates::addHTMLCacheUpdate( $title, 'templatelinks' );