* @ingroup MaintenanceLanguage
*/
-require_once( __DIR__ .'/../Maintenance.php' );
+require_once __DIR__ . '/../Maintenance.php';
/**
* Generate first letter data files for Collation.php
$error .= "You are using outdated version of ICU ($icuVersion), intended for "
. ( $unicodeVersion ? "Unicode $unicodeVersion" : "an unknown version of Unicode" )
. "; this file might not be avalaible for it, and it's not supported by MediaWiki. "
- ." You are on your own; consider upgrading PHP's intl extension or try "
+ . " You are on your own; consider upgrading PHP's intl extension or try "
. "one of the files available at:";
} elseif ( version_compare( $icuVersion, "51.0", ">=" ) ) {
// Extra recent version
// people like to use that as a fake no header symbol.
$category = substr( $data['gc'], 0, 1 );
if ( strpos( 'LNPS', $category ) === false
- && $data['cp'] !== '0020' ) {
+ && $data['cp'] !== '0020'
+ ) {
return;
}
$cp = hexdec( $data['cp'] );
// Calculate implicit weight per UTS #10 v6.0.0, sec 7.1.3
if ( $data['UIdeo'] === 'Y' ) {
if ( $data['block'] == 'CJK Unified Ideographs'
- || $data['block'] == 'CJK Compatibility Ideographs' )
- {
+ || $data['block'] == 'CJK Compatibility Ideographs'
+ ) {
$base = 0xFB40;
} else {
$base = 0xFB80;
}
$this->weights[$cp] = $primary;
if ( $tertiary === '.0008'
- || $tertiary === '.000E' )
- {
+ || $tertiary === '.000E'
+ ) {
$goodTertiaryChars[$cp] = true;
}
}
$char = codepointToUtf8( $cp );
$headerChars[] = $char;
if ( $primaryCollator->compare( $char, $prevChar ) <= 0 ) {
- $numOutOfOrder ++;
+ $numOutOfOrder++;
/*
printf( "Out of order: U+%05X > U+%05X\n",
utf8ToCodepoint( $prevChar ),
$this->xml = new XMLReader;
$this->xml->open( $this->fileName );
if ( !$this->xml ) {
- throw new MWException( __METHOD__.": unable to open {$this->fileName}" );
+ throw new MWException( __METHOD__ . ": unable to open {$this->fileName}" );
}
while ( $this->xml->name !== 'ucd' && $this->xml->read() );
$this->xml->read();
+
return $this->xml;
}
while ( $this->xml->moveToNextAttribute() ) {
$attrs[$this->xml->name] = $this->xml->value;
}
+
return $attrs;
}
}
}
$xml->close();
+
return $this->blocks;
}
-
}
$maintClass = 'GenerateCollationData';
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;