r100129 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100128‎ | r100129 | r100130 >
Date:17:30, 18 October 2011
Author:reedy
Status:ok
Tags:
Comment:
Cleanup whitespace

Couple of bits of documentation
Modified paths:
  • /trunk/phase3/maintenance/language/function-list.php (modified) (history)
  • /trunk/phase3/maintenance/language/generateCollationData.php (modified) (history)
  • /trunk/phase3/maintenance/language/writeMessagesArray.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/generateCollationData.php
@@ -12,7 +12,7 @@
1313 /** The primary weights, indexed by codepoint */
1414 var $weights;
1515
16 - /**
 16+ /**
1717 * A hashtable keyed by codepoint, where presence indicates that a character
1818 * has a decomposition mapping. This makes it non-preferred for group header
1919 * selection.
@@ -30,7 +30,7 @@
3131 public function __construct() {
3232 parent::__construct();
3333 $this->addOption( 'data-dir', 'A directory on the local filesystem ' .
34 - 'containing allkeys.txt and ucd.all.grouped.xml from unicode.org',
 34+ 'containing allkeys.txt and ucd.all.grouped.xml from unicode.org',
3535 false, true );
3636 $this->addOption( 'debug-output', 'Filename for sending debug output to',
3737 false, true );
@@ -72,7 +72,7 @@
7373 // but do not skip a normal space (U+0020) since
7474 // people like to use that as a fake no header symbol.
7575 $category = substr( $data['gc'], 0, 1 );
76 - if ( strpos( 'LNPS', $category ) === false
 76+ if ( strpos( 'LNPS', $category ) === false
7777 && $data['cp'] !== '0020' ) {
7878 return;
7979 }
@@ -84,7 +84,7 @@
8585 return;
8686 }
8787
88 - // Skip the composed Hangul syllables, we will use the bare Jamo
 88+ // Skip the composed Hangul syllables, we will use the bare Jamo
8989 // as first letters
9090 if ( $data['block'] == 'Hangul Syllables' ) {
9191 return;
@@ -163,7 +163,7 @@
164164 }
165165 $this->weights[$cp] = $primary;
166166 if ( $tertiary === '.0008'
167 - || $tertiary === '.000E' )
 167+ || $tertiary === '.000E' )
168168 {
169169 $goodTertiaryChars[$cp] = true;
170170 }
@@ -192,8 +192,8 @@
193193 }
194194
195195 // If one character has a given primary weight sequence, and a second
196 - // character has a longer primary weight sequence with an initial
197 - // portion equal to the first character, then remove the second
 196+ // character has a longer primary weight sequence with an initial
 197+ // portion equal to the first character, then remove the second
198198 // character. This avoids having characters like U+A732 (double A)
199199 // polluting the basic latin sort area.
200200
@@ -306,11 +306,12 @@
307307 while ( $this->xml->name !== 'ucd' && $this->xml->read() );
308308 $this->xml->read();
309309 return $this->xml;
310 - }
 310+ }
311311
312312 /**
313 - * Read the attributes of the current element node and return them
 313+ * Read the attributes of the current element node and return them
314314 * as an array
 315+ * @return array
315316 */
316317 protected function readAttributes() {
317318 $attrs = array();
Index: trunk/phase3/maintenance/language/function-list.php
@@ -23,6 +23,7 @@
2424 define( 'NOT_REALLY_MEDIAWIKI', 1 );
2525
2626 class Language { }
 27+
2728 foreach ( glob( 'Language*.php' ) as $file ) {
2829 if ( $file != 'Language.php' ) {
2930 require_once( $file );
@@ -59,5 +60,3 @@
6061 }
6162
6263 print "$numRemoved will be removed out of $total\n";
63 -
64 -
Index: trunk/phase3/maintenance/language/writeMessagesArray.inc
@@ -106,6 +106,9 @@
107107 # Sort messages to blocks
108108 $sortedMessages['unknown'] = $messages;
109109 foreach( self::$messageStructure as $blockName => $block ) {
 110+ /**
 111+ * @var $block array
 112+ */
110113 foreach( $block as $key ) {
111114 if( array_key_exists( $key, $sortedMessages['unknown'] ) ) {
112115 $sortedMessages[$blockName][$key] = $sortedMessages['unknown'][$key];

Status & tagging log