After training the PHPStorm code formatter.

See https://github.com/siebrand/MediaWiki-PHPStorm

Issue remains with anonymous functions in JavaScript.

Change-Id: I2b520f8df127452acf02deb659277a6465e6ca59
This commit is contained in:
Siebrand Mazeland
2012-09-17 17:10:59 -07:00
parent 569b09712c
commit e1a4f7f0cb
17 changed files with 336 additions and 298 deletions

View File

@@ -44,6 +44,7 @@ class LanguageNameSearch {
$results[$code] = $name;
}
}
return $results;
}
@@ -57,6 +58,7 @@ class LanguageNameSearch {
if ( !isset( $buckets[$bucket] ) ) {
$buckets[$bucket] = array();
}
return $bucket;
}
@@ -73,7 +75,7 @@ class LanguageNameSearch {
$thisValue = ord( $str[$i] );
if ( $thisValue < 128 ) {
return $thisValue;
} else {// Codepoints larger than 127 are represented by multi-byte sequences,
} else { // Codepoints larger than 127 are represented by multi-byte sequences,
if ( count( $values ) === 0 ) {
// 224 is the lowest non-overlong-encoded codepoint.
$lookingFor = ( $thisValue < 224 ) ? 2 : 3;
@@ -82,6 +84,7 @@ class LanguageNameSearch {
if ( count( $values ) === $lookingFor ) {
// Refer http://en.wikipedia.org/wiki/UTF-8#Description
$number = ( $lookingFor === 3 ) ? ( ( $values[0] % 16 ) * 4096 ) + ( ( $values[1] % 64 ) * 64 ) + ( $values[2] % 64 ) : ( ( $values[0] % 32 ) * 64 ) + ( $values[1] % 64 );
return $number;
}
}
@@ -120,7 +123,7 @@ class LanguageNameSearch {
}
$prevRow = $currentRow;
}
return $prevRow[$length2];
}
}