r41935 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41934‎ | r41935 | r41936 >
Date:15:37, 10 October 2008
Author:simetrical
Status:old
Tags:
Comment:
Reformat comment for Title::newFromText

Don't use ugly \type nonsense. We want this to be readable in the source code at least as much as in the auto-generated docs. Follow the standard used everywhere else, documented at <http://www.mediawiki.org/wiki/Manual:Code_standards&gt;: "@param varname type desc...". Also respace to 80 chars per line, not some random number.
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -94,15 +94,14 @@
9595 }
9696
9797 /**
98 - * Create a new Title from text, such as what one would
99 - * find in a link. Decodes any HTML entities in the text.
 98+ * Create a new Title from text, such as what one would find in a link. De-
 99+ * codes any HTML entities in the text.
100100 *
101 - * @param $text \type{\string} the link text; spaces, prefixes,
102 - * and an initial ':' indicating the main namespace
103 - * are accepted
104 - * @param $defaultNamespace \type{\int} the namespace to use if
105 - * none is specified by a prefix
106 - * @return \type{Title} the new object, or NULL on an error
 101+ * @param $text string The link text; spaces, prefixes, and an
 102+ * initial ':' indicating the main namespace are accepted.
 103+ * @param $defaultNamespace int The namespace to use if none is speci-
 104+ * fied by a prefix.
 105+ * @return Title The new object, or null on an error.
107106 */
108107 public static function newFromText( $text, $defaultNamespace = NS_MAIN ) {
109108 if( is_object( $text ) ) {

Status & tagging log