build: Updating mediawiki/mediawiki-codesniffer to 0.7.1
Also added "composer fix" command. Change-Id: I6f3f29f03abb607fbca9cec6f140875f2a3468a0
This commit is contained in:
@@ -33,8 +33,8 @@ class LanguageNameIndexer extends Maintenance {
|
||||
public function execute() {
|
||||
$languages = Language::fetchLanguageNames( null, 'all' );
|
||||
|
||||
$all = array();
|
||||
$buckets = array();
|
||||
$all = [];
|
||||
$buckets = [];
|
||||
foreach ( $languages as $code => $name ) {
|
||||
$all[$code][strtolower( $name )] = true;
|
||||
$langnames = LanguageNames::getNames( $code, 0, 2 );
|
||||
|
||||
@@ -34,12 +34,12 @@ class LanguageNameSearch {
|
||||
$index = self::getIndex( $searchKey );
|
||||
|
||||
if ( !isset( self::$languagenames[$index] ) ) {
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
|
||||
$bucket = self::$languagenames[$index];
|
||||
|
||||
$results = array();
|
||||
$results = [];
|
||||
foreach ( $bucket as $name => $code ) {
|
||||
// Prefix search
|
||||
if ( strrpos( $name, $searchKey, -strlen( $name ) ) !== false
|
||||
@@ -63,7 +63,7 @@ class LanguageNameSearch {
|
||||
* @return integer Code point of first letter of string
|
||||
*/
|
||||
public static function getCodepoint( $str ) {
|
||||
$values = array();
|
||||
$values = [];
|
||||
$lookingFor = 1;
|
||||
$strLen = strlen( $str );
|
||||
$number = 0;
|
||||
@@ -121,7 +121,7 @@ class LanguageNameSearch {
|
||||
}
|
||||
$prevRow = range( 0, $length2 );
|
||||
for ( $i = 0; $i < $length1; $i++ ) {
|
||||
$currentRow = array();
|
||||
$currentRow = [];
|
||||
$currentRow[0] = $i + 1;
|
||||
$c1 = mb_substr( $str1, $i, 1, 'UTF-8' );
|
||||
for ( $j = 0; $j < $length2; $j++ ) {
|
||||
|
||||
Reference in New Issue
Block a user