build: Updating mediawiki/mediawiki-codesniffer to 0.7.1

Also added "composer fix" command.

Change-Id: I6f3f29f03abb607fbca9cec6f140875f2a3468a0
This commit is contained in:
Kunal Mehta
2016-05-09 18:30:34 -07:00
parent 6089ea868d
commit 6b8c33e763
11 changed files with 98 additions and 96 deletions

View File

@@ -17,8 +17,8 @@ class FontRepoCompiler {
public function getRepository() {
$files = $this->getFilesFromPath( $this->fsPath );
$fonts = array();
$languages = array();
$fonts = [];
$languages = [];
foreach ( $files as $file ) {
$conf = $this->parseFile( $file );
@@ -36,14 +36,13 @@ class FontRepoCompiler {
ksort( $languages );
ksort( $fonts );
return array(
return [
'base' => $this->webPath,
'languages' => $languages,
'fonts' => $fonts
);
];
}
public function getFilesFromPath( $fspath ) {
return glob( "$fspath/*/font.ini" );
}
@@ -54,7 +53,7 @@ class FontRepoCompiler {
public function getLanguages( array $font ) {
if ( !isset( $font['languages'] ) ) {
return array();
return [];
}
$languages = explode( ',', $font['languages'] );
@@ -68,7 +67,7 @@ class FontRepoCompiler {
$code = str_replace( '*', '', $rcode );
if ( !isset( $languages[$code] ) ) {
$languages[$code] = array( 'system' );
$languages[$code] = [ 'system' ];
}
if ( strpos( $rcode, '*' ) !== false ) {
@@ -83,7 +82,7 @@ class FontRepoCompiler {
}
public function getFontInfo( $font, $fontpath, &$version ) {
$info = array();
$info = [];
$fontdir = basename( $fontpath );
$version = $info['version'] = isset( $font['version'] ) ? $font['version'] : $version;