@@ -42,12 +42,12 @@ discard block |
||
42 | 42 | $simpleBatchUpload->registerEarlyConfiguration( $GLOBALS ); |
43 | 43 | } |
44 | 44 | |
45 | - public function registerEarlyConfiguration( &$targetConfiguration ){ |
|
45 | + public function registerEarlyConfiguration( &$targetConfiguration ) { |
|
46 | 46 | $sourceConfiguration = $this->getEarlyConfiguration(); |
47 | 47 | $this->mergeConfiguration( $sourceConfiguration, $targetConfiguration ); |
48 | 48 | } |
49 | 49 | |
50 | - public function registerLateConfiguration( &$targetConfiguration ){ |
|
50 | + public function registerLateConfiguration( &$targetConfiguration ) { |
|
51 | 51 | $sourceConfiguration = $this->getLateConfiguration(); |
52 | 52 | $this->mergeConfiguration( $sourceConfiguration, $targetConfiguration ); |
53 | 53 | } |
@@ -57,13 +57,13 @@ discard block |
||
57 | 57 | */ |
58 | 58 | protected function mergeConfiguration( $sourceConfiguration, &$targetConfiguration ) { |
59 | 59 | foreach ( $sourceConfiguration as $varname => $value ) { |
60 | - $targetConfiguration[ $varname ] = array_key_exists( $varname, $targetConfiguration )?array_replace_recursive( $targetConfiguration[ $varname ], $value ):$value; |
|
60 | + $targetConfiguration[ $varname ] = array_key_exists( $varname, $targetConfiguration ) ?array_replace_recursive( $targetConfiguration[ $varname ], $value ) : $value; |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 | |
64 | 64 | protected function getEarlyConfiguration(): array { |
65 | 65 | |
66 | - $configuration = []; |
|
66 | + $configuration = [ ]; |
|
67 | 67 | |
68 | 68 | $configuration[ 'wgExtensionMessagesFiles' ][ 'SimpleBatchUploadAlias' ] = __DIR__ . '/SimpleBatchUpload.alias.php'; |
69 | 69 | $configuration[ 'wgExtensionMessagesFiles' ][ 'SimpleBatchUploadMagic' ] = __DIR__ . '/SimpleBatchUpload.magic.php'; |
@@ -72,14 +72,14 @@ discard block |
||
72 | 72 | |
73 | 73 | $configuration[ 'wgHooks' ][ 'ParserFirstCallInit' ][ 'ext.simplebatchupload' ] = [ $this, 'registerParserFunction' ]; |
74 | 74 | $configuration[ 'wgHooks' ][ 'MakeGlobalVariablesScript' ][ 'ext.simplebatchupload' ] = [ $this, 'onMakeGlobalVariablesScript' ]; |
75 | - $configuration[ 'wgHooks' ][ 'SetupAfterCache' ][ 'ext.simplebatchupload' ] = [ $this, 'onSetupAfterCache']; |
|
75 | + $configuration[ 'wgHooks' ][ 'SetupAfterCache' ][ 'ext.simplebatchupload' ] = [ $this, 'onSetupAfterCache' ]; |
|
76 | 76 | |
77 | 77 | return $configuration; |
78 | 78 | } |
79 | 79 | |
80 | 80 | protected function getLateConfiguration(): array { |
81 | 81 | |
82 | - $configuration = []; |
|
82 | + $configuration = [ ]; |
|
83 | 83 | $configuration[ 'wgResourceModules' ] = $this->getUploadSupportModuleDefinition() + $this->getUploadModuleDefinition(); |
84 | 84 | |
85 | 85 | return $configuration; |
@@ -115,9 +115,9 @@ discard block |
||
115 | 115 | $dependencies = [ 'ext.SimpleBatchUpload.jquery-file-upload', 'mediawiki.Title', 'mediawiki.jqueryMsg' ]; |
116 | 116 | |
117 | 117 | if ( version_compare( $GLOBALS[ 'wgVersion' ], '1.32.0', '>' ) ) { |
118 | - $dependencies[] = 'mediawiki.api'; |
|
118 | + $dependencies[ ] = 'mediawiki.api'; |
|
119 | 119 | } else { |
120 | - $dependencies[] = 'mediawiki.api.edit'; |
|
120 | + $dependencies[ ] = 'mediawiki.api.edit'; |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | return [ 'ext.SimpleBatchUpload' => |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | * @param \OutputPage $out |
150 | 150 | */ |
151 | 151 | public function onMakeGlobalVariablesScript( &$vars, $out ) { |
152 | - $vars['simpleBatchUploadMaxFilesPerBatch'] = $this->getMaxFilesPerBatchConfig(); |
|
152 | + $vars[ 'simpleBatchUploadMaxFilesPerBatch' ] = $this->getMaxFilesPerBatchConfig(); |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | public function onSetupAfterCache() { |
@@ -42,12 +42,12 @@ |
||
42 | 42 | $simpleBatchUpload->registerEarlyConfiguration( $GLOBALS ); |
43 | 43 | } |
44 | 44 | |
45 | - public function registerEarlyConfiguration( &$targetConfiguration ){ |
|
45 | + public function registerEarlyConfiguration( &$targetConfiguration ) { |
|
46 | 46 | $sourceConfiguration = $this->getEarlyConfiguration(); |
47 | 47 | $this->mergeConfiguration( $sourceConfiguration, $targetConfiguration ); |
48 | 48 | } |
49 | 49 | |
50 | - public function registerLateConfiguration( &$targetConfiguration ){ |
|
50 | + public function registerLateConfiguration( &$targetConfiguration ) { |
|
51 | 51 | $sourceConfiguration = $this->getLateConfiguration(); |
52 | 52 | $this->mergeConfiguration( $sourceConfiguration, $targetConfiguration ); |
53 | 53 | } |