From: Kunal Mehta Date: Wed, 27 Apr 2016 21:34:18 +0000 (-0700) Subject: LinkCache: Clarify in doc comments what format $title is X-Git-Tag: 1.31.0-rc.0~7154 X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=commitdiff_plain;h=cfea4137e91d204c8158e9368d7ce5c339f7f354;p=lhc%2Fweb%2Fwiklou.git LinkCache: Clarify in doc comments what format $title is Sometimes $title is a Title object, sometimes it is the prefixed DB key as a string. Change-Id: I0e574f35f0c3193bc933e77250c42765626d3cbf --- diff --git a/includes/cache/LinkCache.php b/includes/cache/LinkCache.php index 9da39711ff..b8f232939f 100644 --- a/includes/cache/LinkCache.php +++ b/includes/cache/LinkCache.php @@ -105,7 +105,7 @@ class LinkCache { } /** - * @param string $title + * @param string $title Prefixed DB key * @return int Page ID or zero */ public function getGoodLinkID( $title ) { @@ -123,7 +123,7 @@ class LinkCache { * @param string $field ('length','redirect','revision','model') * @return string|int|null */ - public function getGoodLinkFieldObj( $title, $field ) { + public function getGoodLinkFieldObj( Title $title, $field ) { $dbkey = $title->getPrefixedDBkey(); $info = $this->mGoodLinks->get( $dbkey ); if ( !$info ) { @@ -133,7 +133,7 @@ class LinkCache { } /** - * @param string $title + * @param string $title Prefixed DB key * @return bool */ public function isBadLink( $title ) { @@ -196,7 +196,7 @@ class LinkCache { } /** - * @param string $title prefixed dbkey + * @param string $title Prefixed DB key */ public function clearBadLink( $title ) { $this->mBadLinks->delete( $title ); @@ -205,7 +205,7 @@ class LinkCache { /** * @param Title $title */ - public function clearLink( $title ) { + public function clearLink( Title $title ) { $dbkey = $title->getPrefixedDBkey(); $this->mBadLinks->delete( $dbkey ); $this->mGoodLinks->delete( $dbkey ); @@ -214,7 +214,7 @@ class LinkCache { /** * Add a title to the link cache, return the page_id or zero if non-existent * - * @param string $title Title to add + * @param string $title Prefixed DB key * @return int Page ID or zero */ public function addLink( $title ) {