r64507 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64506‎ | r64507 | r64508 >
Date:22:30, 1 April 2010
Author:svip
Status:ok
Tags:
Comment:
Follow up to r64482
Modified paths:
  • /trunk/extensions/NaturalLanguageList/NaturalLanguageList.php (modified) (history)

Diff [purge]

Index: trunk/extensions/NaturalLanguageList/NaturalLanguageList.php
@@ -115,12 +115,12 @@
116116 public $mArgs;
117117 private $mSeparator = null;
118118 private $mOptions = array(
119 - 'fieldsperitem' => -1, # size of pairs
120 - 'duplicates' => true, # allow same elements to appear
121 - 'blanks' => false, # allow blank elements to appear
122 - 'itemoutput' => null, # the format for each element
123 - 'outputseparator' => null, # the separator between output elements
124 - 'lastseparator' => null, # the separator between the last two elements
 119+ 'fieldsperitem' => -1, # size of pairs
 120+ 'duplicates' => true, # allow same elements to appear
 121+ 'blanks' => false, # allow blank elements to appear
 122+ 'itemoutput' => null, # the format for each element
 123+ 'outputseparator' => null, # the separator between output elements
 124+ 'lastseparator' => null, # the separator between the last two elements
125125 );
126126 private $mReaditems = array();
127127 public $mParams = array();
@@ -169,7 +169,7 @@
170170 /**
171171 * Create $this->mParams from $this->mReaditems using $this->mOptions.
172172 *
173 - * @param $separator [default:null] Input separator (e.g. ',')
 173+ * @param $separator String [default:null] Input separator (e.g. ',')
174174 */
175175 private function readArgs( $separator=null ) {
176176 $items = array(); # array of args to include
@@ -202,7 +202,7 @@
203203 * Create $this->mOptions and $this->mReaditems from $this->mArgs using $this->mFrame.
204204 *
205205 * @param $ignorefirst boolean Ignore first element in case of {{#rawlist:}}
206 - * @param $separator [default:null] Input separator
 206+ * @param $separator String [default:null] Input separator
207207 */
208208 private function readOptions ( $ignorefirst, $separator=null ) {
209209 $args = $this->mArgs;
@@ -277,9 +277,9 @@
278278 * If it is, then it handles the option (and applies it).
279279 * If it isn't, then it just returns the string it found.
280280 *
281 - * @param $arg Argument
282 - * @param $separator Input separator
283 - * @return Return string if element, else return false
 281+ * @param $arg String Argument
 282+ * @param $separator String [default:null] Input separator
 283+ * @return String if element, else return false
284284 */
285285 private function handleInputItem( $arg, $separator=null ) {
286286 if ( $arg instanceof PPNode_DOM ) {
@@ -334,7 +334,7 @@
335335 /**
336336 * Using magic to store all known names for each option
337337 *
338 - * @param $input string
 338+ * @param $input String
339339 * @return The option found; otherwise false
340340 */
341341 private static function parseOptionName( $value ) {
@@ -360,9 +360,9 @@
361361 /**
362362 * Insert a new element into an array.
363363 *
364 - * @param $array The array in question
365 - * @param $value The element to be inserted
366 - * @param $separator [default:null] Input separator
 364+ * @param $array Array The array in question
 365+ * @param $value Mixed The element to be inserted
 366+ * @param $separator String [default:null] Input separator
367367 */
368368 private static function parseArrayItem( &$array, $value, $separator=null ) {
369369 # if no separator, just assume the value can be appended,
@@ -382,7 +382,7 @@
383383 * Parse numeral
384384 *
385385 * @param $value Integer
386 - * @param $default [default:1] Integer
 386+ * @param $default Integer [default:1]
387387 * @return The integer if integer and above 0, otherwise $default
388388 */
389389 private static function parseNumeral( $value, $default = 1 ) {
@@ -396,7 +396,7 @@
397397 * Parse string
398398 *
399399 * @param $value String
400 - * @param $default [default:null] String
 400+ * @param $default String [default:null]
401401 * @return The string, if none found, return $default
402402 */
403403 private static function parseString( $value, $default = null ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r64482Tidying up code, added comments to each function, etc.svip11:37, 1 April 2010

Status & tagging log