@@ -22,10 +22,10 @@ |
||
| 22 | 22 | * @ingroup ExtensionManager |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | -$magicWords = []; |
|
| 25 | +$magicWords = [ ]; |
|
| 26 | 26 | |
| 27 | 27 | /** English |
| 28 | 28 | */ |
| 29 | -$magicWords['en'] = [ |
|
| 29 | +$magicWords[ 'en' ] = [ |
|
| 30 | 30 | 'batchupload' => [ 0, 'batchupload' ], |
| 31 | 31 | ]; |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | * @return ParameterProvider |
| 75 | 75 | */ |
| 76 | 76 | protected function prepareParameterProvider( $args ) { |
| 77 | - $templateName = $args[0]; |
|
| 77 | + $templateName = $args[ 0 ]; |
|
| 78 | 78 | |
| 79 | 79 | $paramProvider = new ParameterProvider( $templateName ); |
| 80 | 80 | |
@@ -22,10 +22,10 @@ |
||
| 22 | 22 | * @ingroup ExtensionManager |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | -$specialPageAliases = []; |
|
| 25 | +$specialPageAliases = [ ]; |
|
| 26 | 26 | |
| 27 | 27 | /** English |
| 28 | 28 | */ |
| 29 | -$specialPageAliases['en'] = [ |
|
| 29 | +$specialPageAliases[ 'en' ] = [ |
|
| 30 | 30 | 'BatchUpload' => [ 'BatchUpload' ], |
| 31 | 31 | ]; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | if ( $this->parameters === null ) { |
| 90 | 90 | $this->populateParameters(); |
| 91 | 91 | } |
| 92 | - return $this->parameters[$key]; |
|
| 92 | + return $this->parameters[ $key ]; |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | private function populateParameters() { |
@@ -110,8 +110,8 @@ discard block |
||
| 110 | 110 | $paramSet = array_combine( array_column( $paramSet, 0 ), $paramSet ); |
| 111 | 111 | |
| 112 | 112 | if ( array_key_exists( $this->templateName, $paramSet ) ) { |
| 113 | - $this->setParameters( $this->templateName, '', $paramSet[$this->templateName][1], |
|
| 114 | - $paramSet[$this->templateName][2] ); |
|
| 113 | + $this->setParameters( $this->templateName, '', $paramSet[ $this->templateName ][ 1 ], |
|
| 114 | + $paramSet[ $this->templateName ][ 2 ] ); |
|
| 115 | 115 | return true; |
| 116 | 116 | } |
| 117 | 117 | } |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | $this->populateParameters(); |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | - $this->parameters[self::IDX_TEMPLATEPARAMETERS] .= '|' . $parameter; |
|
| 163 | + $this->parameters[ self::IDX_TEMPLATEPARAMETERS ] .= '|' . $parameter; |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | /** |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $configuration = ( new self() )->getConfiguration(); |
| 34 | 34 | |
| 35 | 35 | foreach ( $configuration as $varname => $value ) { |
| 36 | - $GLOBALS[$varname] = array_replace_recursive( $GLOBALS[$varname], $value ); |
|
| 36 | + $GLOBALS[ $varname ] = array_replace_recursive( $GLOBALS[ $varname ], $value ); |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |
@@ -41,20 +41,20 @@ discard block |
||
| 41 | 41 | * @return array |
| 42 | 42 | */ |
| 43 | 43 | public function getConfiguration() { |
| 44 | - $configuration = []; |
|
| 44 | + $configuration = [ ]; |
|
| 45 | 45 | |
| 46 | - $configuration['wgExtensionMessagesFiles']['SimpleBatchUploadAlias'] = __DIR__ . '/SimpleBatchUpload.alias.php'; |
|
| 47 | - $configuration['wgExtensionMessagesFiles']['SimpleBatchUploadMagic'] = __DIR__ . '/SimpleBatchUpload.magic.php'; |
|
| 46 | + $configuration[ 'wgExtensionMessagesFiles' ][ 'SimpleBatchUploadAlias' ] = __DIR__ . '/SimpleBatchUpload.alias.php'; |
|
| 47 | + $configuration[ 'wgExtensionMessagesFiles' ][ 'SimpleBatchUploadMagic' ] = __DIR__ . '/SimpleBatchUpload.magic.php'; |
|
| 48 | 48 | |
| 49 | - $configuration['wgSpecialPages']['BatchUpload'] = '\SimpleBatchUpload\SpecialBatchUpload'; |
|
| 49 | + $configuration[ 'wgSpecialPages' ][ 'BatchUpload' ] = '\SimpleBatchUpload\SpecialBatchUpload'; |
|
| 50 | 50 | |
| 51 | - $configuration['wgHooks']['ParserFirstCallInit']['ext.simplebatchupload'] = [ $this, 'registerParserFunction' ]; |
|
| 52 | - $configuration['wgHooks']['MakeGlobalVariablesScript']['ext.simplebatchupload'] = [ |
|
| 51 | + $configuration[ 'wgHooks' ][ 'ParserFirstCallInit' ][ 'ext.simplebatchupload' ] = [ $this, 'registerParserFunction' ]; |
|
| 52 | + $configuration[ 'wgHooks' ][ 'MakeGlobalVariablesScript' ][ 'ext.simplebatchupload' ] = [ |
|
| 53 | 53 | $this, |
| 54 | 54 | 'onMakeGlobalVariablesScript' |
| 55 | 55 | ]; |
| 56 | 56 | |
| 57 | - $configuration['wgResourceModules'] = $this->getUploadSupportModuleDefinition() + |
|
| 57 | + $configuration[ 'wgResourceModules' ] = $this->getUploadSupportModuleDefinition() + |
|
| 58 | 58 | $this->getUploadModuleDefinition(); |
| 59 | 59 | |
| 60 | 60 | return $configuration; |
@@ -87,8 +87,8 @@ discard block |
||
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | return [ |
| 90 | - 'localBasePath' => $GLOBALS['IP'], |
|
| 91 | - 'remoteBasePath' => $GLOBALS['wgScriptPath'], |
|
| 90 | + 'localBasePath' => $GLOBALS[ 'IP' ], |
|
| 91 | + 'remoteBasePath' => $GLOBALS[ 'wgScriptPath' ], |
|
| 92 | 92 | ]; |
| 93 | 93 | } |
| 94 | 94 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | protected function getBasePathsForNonComposerModules() { |
| 99 | 99 | return [ |
| 100 | 100 | 'localBasePath' => dirname( __DIR__ ), |
| 101 | - 'remoteBasePath' => $GLOBALS['wgExtensionAssetsPath'] . '/SimpleBatchUpload', |
|
| 101 | + 'remoteBasePath' => $GLOBALS[ 'wgExtensionAssetsPath' ] . '/SimpleBatchUpload', |
|
| 102 | 102 | ]; |
| 103 | 103 | } |
| 104 | 104 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | public function onMakeGlobalVariablesScript( &$vars, $out ) { |
| 134 | 134 | global $wgSimpleBatchUploadMaxFilesPerBatch; |
| 135 | - $vars['wgSimpleBatchUploadMaxFilesPerBatch'] = $wgSimpleBatchUploadMaxFilesPerBatch; |
|
| 135 | + $vars[ 'wgSimpleBatchUploadMaxFilesPerBatch' ] = $wgSimpleBatchUploadMaxFilesPerBatch; |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | /** |