* serializing at present.
*
* Compact the titles, only serialize the text form.
- * @return array
- */
+ * @return array
+ */
function __sleep() {
foreach ( $this->internals as &$nsLinks ) {
foreach ( $nsLinks as &$entry ) {
/**
* Merge another LinkHolderArray into this one
- * @param $other LinkHolderArray
+ * @param LinkHolderArray $other
*/
function merge( $other ) {
foreach ( $other->internals as $ns => $entries ) {
* converted for use in the destination link holder. The resulting array of
* strings will be returned.
*
- * @param $other LinkHolderArray
- * @param array $texts of strings
- * @return Array
+ * @param LinkHolderArray $other
+ * @param array $texts Array of strings
+ * @return array
*/
function mergeForeign( $other, $texts ) {
$this->tempIdOffset = $idOffset = $this->parent->nextLinkID();
* parsing of interwiki links, and secondly to allow all existence checks and
* article length checks (for stub links) to be bundled into a single query.
*
- * @param $nt Title
- * @param $text String
+ * @param Title $nt
+ * @param string $text
* @param array $query [optional]
* @param string $trail [optional]
* @param string $prefix [optional]
/**
* Replace <!--LINK--> link placeholders with actual links, in the buffer
*
- * @return array of link CSS classes, indexed by PDBK.
+ * @return array Array of link CSS classes, indexed by PDBK.
*/
function replace( &$text ) {
wfProfileIn( __METHOD__ );
/**
* Replace internal links
+ * @param string $text
*/
protected function replaceInternal( &$text ) {
if ( !$this->internals ) {
/**
* Replace interwiki links
+ * @param string $text
*/
protected function replaceInterwiki( &$text ) {
if ( empty( $this->interwikis ) ) {
/**
* Modify $this->internals and $colours according to language variant linking rules
+ * @param array $colours
*/
protected function doVariants( &$colours ) {
global $wgContLang;
// Self-link checking for mixed/different variant titles. At this point, we
// already know the exact title does not exist, so the link cannot be to a
// variant of the current title that exists as a separate page.
- if ( $variantTitle->equals( $parentTitle ) && $title->getFragment() === '' ) {
+ if ( $variantTitle->equals( $parentTitle ) && !$title->hasFragment() ) {
$this->internals[$ns][$index]['selflink'] = true;
continue 2;
}
* Replace <!--LINK--> link placeholders with plain text of links
* (not HTML-formatted).
*
- * @param $text String
- * @return String
+ * @param string $text
+ * @return string
*/
function replaceText( $text ) {
wfProfileIn( __METHOD__ );
/**
* Callback for replaceText()
*
- * @param $matches Array
+ * @param array $matches
* @return string
* @private
*/