X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finstaller%2FWebInstallerOutput.php;h=b4c8aa8649966b50bbe3fa90540b98241e7acaa2;hb=9477e3ef3cfd75038119e45aab4fb3af0e8a035d;hp=0ccdb11af9e383efbc7ad2b1500a901cd264512c;hpb=5161541d87d663ea86b66258a568349a6cc8fde9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/WebInstallerOutput.php b/includes/installer/WebInstallerOutput.php index 0ccdb11af9..b4c8aa8649 100644 --- a/includes/installer/WebInstallerOutput.php +++ b/includes/installer/WebInstallerOutput.php @@ -126,12 +126,12 @@ class WebInstallerOutput { public function getCSS() { global $wgStyleDirectory; - $moduleNames = array( + $moduleNames = [ // See SkinTemplate::setupSkinUserCss 'mediawiki.legacy.shared', // See Vector::setupSkinUserCss 'mediawiki.skinning.interface', - ); + ]; $resourceLoader = new ResourceLoader(); @@ -139,9 +139,9 @@ class WebInstallerOutput { // Force loading Vector skin if available as a fallback skin // for whatever ResourceLoader wants to have as the default. $registry = new ExtensionRegistry(); - $data = $registry->readFromQueue( array( + $data = $registry->readFromQueue( [ "$wgStyleDirectory/Vector/skin.json" => 1, - ) ); + ] ); if ( isset( $data['globals']['wgResourceModules'] ) ) { $resourceLoader->register( $data['globals']['wgResourceModules'] ); } @@ -151,13 +151,13 @@ class WebInstallerOutput { $moduleNames[] = 'mediawiki.legacy.config'; - $rlContext = new ResourceLoaderContext( $resourceLoader, new FauxRequest( array( + $rlContext = new ResourceLoaderContext( $resourceLoader, new FauxRequest( [ 'debug' => 'true', 'lang' => $this->getLanguageCode(), 'only' => 'styles', - ) ) ); + ] ) ); - $styles = array(); + $styles = []; foreach ( $moduleNames as $moduleName ) { /** @var ResourceLoaderFileModule $module */ $module = $resourceLoader->getModule( $moduleName ); @@ -170,7 +170,8 @@ class WebInstallerOutput { $styles = array_merge( $styles, ResourceLoader::makeCombinedStyles( $module->readStyleFiles( $module->getStyleFiles( $rlContext ), - $module->getFlip( $rlContext ) + $module->getFlip( $rlContext ), + $rlContext ) ) ); } @@ -227,10 +228,10 @@ class WebInstallerOutput { * @return string[] */ public function getHeadAttribs() { - return array( + return [ 'dir' => $this->getDir(), 'lang' => wfBCP47( $this->getLanguageCode() ), - ); + ]; } /** @@ -272,7 +273,7 @@ class WebInstallerOutput { - $this->getDir() ) ) . "\n"; ?> + $this->getDir() ] ) . "\n"; ?>