@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * @return SimpleBatchUpload |
| 36 | 36 | */ |
| 37 | 37 | public static function singleton() { |
| 38 | - if ( !isset( self::$singleton ) ) { |
|
| 38 | + if (!isset(self::$singleton)) { |
|
| 39 | 39 | self::$singleton = new self(); |
| 40 | 40 | } |
| 41 | 41 | |
@@ -61,12 +61,12 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | $moduleDescription = [ |
| 63 | 63 | 'scripts' => [ '/vendor/blueimp/jquery-file-upload/js/jquery.fileupload.js' ], |
| 64 | - 'styles' => [ '/vendor/blueimp/jquery-file-upload/css/jquery.fileupload.css' ], |
|
| 64 | + 'styles' => [ '/vendor/blueimp/jquery-file-upload/css/jquery.fileupload.css' ], |
|
| 65 | 65 | 'position' => 'top', |
| 66 | 66 | 'dependencies' => [ 'jquery.ui.widget' ], |
| 67 | 67 | ]; |
| 68 | 68 | |
| 69 | - $this->registerResourceModule( 'ext.SimpleBatchUpload.jquery-file-upload', $moduleDescription, true ); |
|
| 69 | + $this->registerResourceModule('ext.SimpleBatchUpload.jquery-file-upload', $moduleDescription, true); |
|
| 70 | 70 | |
| 71 | 71 | } |
| 72 | 72 | |
@@ -79,16 +79,16 @@ discard block |
||
| 79 | 79 | 'dependencies' => [ 'ext.SimpleBatchUpload.jquery-file-upload', 'mediawiki.Title' ], |
| 80 | 80 | ]; |
| 81 | 81 | |
| 82 | - $this->registerResourceModule( 'ext.SimpleBatchUpload', $moduleDescription, false ); |
|
| 82 | + $this->registerResourceModule('ext.SimpleBatchUpload', $moduleDescription, false); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | /** |
| 86 | 86 | * @return array |
| 87 | 87 | */ |
| 88 | - protected function registerResourceModule( $moduleName, $moduleDefinition, $isDependency = false ) { |
|
| 88 | + protected function registerResourceModule($moduleName, $moduleDefinition, $isDependency = false) { |
|
| 89 | 89 | |
| 90 | - if ( file_exists( dirname( __DIR__ ) . '/vendor' ) || !$isDependency ) { |
|
| 91 | - $localBasePath = dirname( __DIR__ ); |
|
| 90 | + if (file_exists(dirname(__DIR__) . '/vendor') || !$isDependency) { |
|
| 91 | + $localBasePath = dirname(__DIR__); |
|
| 92 | 92 | $remoteBasePath = $GLOBALS[ 'wgExtensionAssetsPath' ] . '/SimpleBatchUpload'; |
| 93 | 93 | } else { |
| 94 | 94 | $localBasePath = $GLOBALS[ 'IP' ]; |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | $GLOBALS[ 'wgResourceModules' ][ $moduleName ] = |
| 99 | - array_merge( [ 'localBasePath' => $localBasePath, 'remoteBasePath' => $remoteBasePath ], $moduleDefinition ); |
|
| 99 | + array_merge([ 'localBasePath' => $localBasePath, 'remoteBasePath' => $remoteBasePath ], $moduleDefinition); |
|
| 100 | 100 | |
| 101 | 101 | } |
| 102 | 102 | } |