Passed
Push — master ( b695cf...2dc484 )
by Jeroen De
09:45 queued 07:42
created
src/Bootstrap.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,16 +51,16 @@
 block discarded – undo
51 51
 	 */
52 52
 	public static function init() {
53 53
 
54
-		ExtensionRegistryHelper::singleton()->loadExtensionRecursive( 'Scss' );
54
+		ExtensionRegistryHelper::singleton()->loadExtensionRecursive('Scss');
55 55
 
56
-		$GLOBALS[ 'wgHooks' ][ 'SetupAfterCache' ][] = function () {
56
+		$GLOBALS['wgHooks']['SetupAfterCache'][] = function() {
57 57
 
58 58
 			$configuration = [];
59
-			$configuration[ 'IP' ] = $GLOBALS[ 'IP' ];
60
-			$configuration[ 'remoteBasePath' ] = $GLOBALS[ 'wgExtensionAssetsPath' ] . '/Bootstrap/resources/bootstrap';
61
-			$configuration[ 'localBasePath' ] = $GLOBALS[ 'wgExtensionDirectory' ] . '/Bootstrap/resources/bootstrap';
59
+			$configuration['IP'] = $GLOBALS['IP'];
60
+			$configuration['remoteBasePath'] = $GLOBALS['wgExtensionAssetsPath'] . '/Bootstrap/resources/bootstrap';
61
+			$configuration['localBasePath'] = $GLOBALS['wgExtensionDirectory'] . '/Bootstrap/resources/bootstrap';
62 62
 
63
-			$setupAfterCache = new SetupAfterCache( $configuration );
63
+			$setupAfterCache = new SetupAfterCache($configuration);
64 64
 			$setupAfterCache->process();
65 65
 		};
66 66
 	}
Please login to merge, or discard this patch.
src/Definition/V4ModuleDefinition.php 1 patch
Spacing   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -34,61 +34,61 @@  discard block
 block discarded – undo
34 34
 class V4ModuleDefinition implements ModuleDefinition {
35 35
 
36 36
 	static private $moduleDescriptions = [
37
-		'functions'         => [ 'styles' => [ 'functions' => [ 'position' => 'functions' ] ] ],
38
-		'variables'         => [ 'styles' => [ 'variables' => [ 'position' => 'variables' ] ], 'dependencies' => 'functions' ],
39
-		'mixins'            => [ 'styles' => 'mixins' ],
40
-		'root'              => [ 'styles' => 'root' ],
41
-		'reboot'            => [ 'styles' => 'reboot' ],
42
-		'type'              => [ 'styles' => 'type' ],
43
-		'images'            => [ 'styles' => 'images' ],
44
-		'code'              => [ 'styles' => 'code' ],
45
-		'grid'              => [ 'styles' => 'grid' ],
46
-		'tables'            => [ 'styles' => 'tables' ],
47
-		'forms'             => [ 'styles' => 'forms' ],
48
-		'buttons'           => [ 'styles' => 'buttons' ],
49
-		'transitions'       => [ 'styles' => 'transitions' ],
50
-		'dropdown'          => [ 'styles' => 'dropdown', 'scripts' => 'dropdown.js', 'dependencies' => [ 'popper', 'js-util' ] ],
51
-		'button-group'      => [ 'styles' => 'button-group', 'dependencies' => [ 'buttons' ] ],
52
-		'input-group'       => [ 'styles' => 'input-group', 'dependencies' => [ 'forms' ] ],
53
-		'custom-forms'      => [ 'styles' => 'custom-forms' ],
54
-		'nav'               => [ 'styles' => 'nav' ],
55
-		'navbar'            => [ 'styles' => 'navbar' ],
56
-		'card'              => [ 'styles' => 'card' ],
57
-		'breadcrumb'        => [ 'styles' => 'breadcrumb' ],
58
-		'pagination'        => [ 'styles' => 'pagination' ],
59
-		'badge'             => [ 'styles' => 'badge' ],
60
-		'jumbotron'         => [ 'styles' => 'jumbotron' ],
61
-		'alert'             => [ 'styles' => 'alert' ],
62
-		'progress'          => [ 'styles' => 'progress' ],
63
-		'media'             => [ 'styles' => 'media' ],
64
-		'list-group'        => [ 'styles' => 'list-group' ],
65
-		'close'             => [ 'styles' => 'close' ],
66
-		'toasts'            => [ 'styles' => 'toasts', 'scripts' => 'toast.js', 'dependencies' => 'js-util' ],
67
-		'modal'             => [ 'styles' => 'modal', 'scripts' => 'modal.js' ],
68
-		'tooltip'           => [ 'styles' => 'tooltip', 'dependencies' => [ 'popper', 'js-util' ] ],
69
-		'popover'           => [ 'styles' => 'popover', 'dependencies' => [ 'popper', 'tooltip', 'js-util' ] ],
70
-		'carousel'          => [ 'styles' => 'carousel', 'scripts' => 'carousel.js', 'dependencies' => 'js-util' ],
71
-		'spinners'          => [ 'styles' => 'spinners' ],
72
-		'utilities'         => [ 'styles' => 'utilities' ],
73
-		'print'             => [ 'styles' => 'print' ],
74
-		'active-buttons'    => [ 'scripts' => 'button.js', 'dependencies' => [ 'buttons' ] ],
75
-		'dismissable-alert' => [ 'scripts' => 'alert.js', 'dependencies' => [ 'alert', 'js-util' ] ],
76
-		'collapse'          => [ 'scripts' => 'collapse.js' ],
77
-		'scrollspy'         => [ 'scripts' => 'scrollspy.js', 'dependencies' => [ 'popper', 'js-util' ] ],
78
-		'tab'               => [ 'scripts' => 'tab.js', 'dependencies' => [ 'list-group' ] ],
79
-		'js-util'           => [ 'scripts' => 'util.js' ],
80
-		'popper'            => [ 'scripts' => 'popper.js' ],
37
+		'functions'         => ['styles' => ['functions' => ['position' => 'functions']]],
38
+		'variables'         => ['styles' => ['variables' => ['position' => 'variables']], 'dependencies' => 'functions'],
39
+		'mixins'            => ['styles' => 'mixins'],
40
+		'root'              => ['styles' => 'root'],
41
+		'reboot'            => ['styles' => 'reboot'],
42
+		'type'              => ['styles' => 'type'],
43
+		'images'            => ['styles' => 'images'],
44
+		'code'              => ['styles' => 'code'],
45
+		'grid'              => ['styles' => 'grid'],
46
+		'tables'            => ['styles' => 'tables'],
47
+		'forms'             => ['styles' => 'forms'],
48
+		'buttons'           => ['styles' => 'buttons'],
49
+		'transitions'       => ['styles' => 'transitions'],
50
+		'dropdown'          => ['styles' => 'dropdown', 'scripts' => 'dropdown.js', 'dependencies' => ['popper', 'js-util']],
51
+		'button-group'      => ['styles' => 'button-group', 'dependencies' => ['buttons']],
52
+		'input-group'       => ['styles' => 'input-group', 'dependencies' => ['forms']],
53
+		'custom-forms'      => ['styles' => 'custom-forms'],
54
+		'nav'               => ['styles' => 'nav'],
55
+		'navbar'            => ['styles' => 'navbar'],
56
+		'card'              => ['styles' => 'card'],
57
+		'breadcrumb'        => ['styles' => 'breadcrumb'],
58
+		'pagination'        => ['styles' => 'pagination'],
59
+		'badge'             => ['styles' => 'badge'],
60
+		'jumbotron'         => ['styles' => 'jumbotron'],
61
+		'alert'             => ['styles' => 'alert'],
62
+		'progress'          => ['styles' => 'progress'],
63
+		'media'             => ['styles' => 'media'],
64
+		'list-group'        => ['styles' => 'list-group'],
65
+		'close'             => ['styles' => 'close'],
66
+		'toasts'            => ['styles' => 'toasts', 'scripts' => 'toast.js', 'dependencies' => 'js-util'],
67
+		'modal'             => ['styles' => 'modal', 'scripts' => 'modal.js'],
68
+		'tooltip'           => ['styles' => 'tooltip', 'dependencies' => ['popper', 'js-util']],
69
+		'popover'           => ['styles' => 'popover', 'dependencies' => ['popper', 'tooltip', 'js-util']],
70
+		'carousel'          => ['styles' => 'carousel', 'scripts' => 'carousel.js', 'dependencies' => 'js-util'],
71
+		'spinners'          => ['styles' => 'spinners'],
72
+		'utilities'         => ['styles' => 'utilities'],
73
+		'print'             => ['styles' => 'print'],
74
+		'active-buttons'    => ['scripts' => 'button.js', 'dependencies' => ['buttons']],
75
+		'dismissable-alert' => ['scripts' => 'alert.js', 'dependencies' => ['alert', 'js-util']],
76
+		'collapse'          => ['scripts' => 'collapse.js'],
77
+		'scrollspy'         => ['scripts' => 'scrollspy.js', 'dependencies' => ['popper', 'js-util']],
78
+		'tab'               => ['scripts' => 'tab.js', 'dependencies' => ['list-group']],
79
+		'js-util'           => ['scripts' => 'util.js'],
80
+		'popper'            => ['scripts' => 'popper.js'],
81 81
 
82
-		'bs-core'   => [ 'dependencies' => [ 'variables', 'mixins' ] ],
83
-		'bs-reboot' => [ 'dependencies' => [ 'bs-core', 'reboot' ] ],
84
-		'bs-grid'   => [ 'styles' => 'bootstrap-grid' ],
82
+		'bs-core'   => ['dependencies' => ['variables', 'mixins']],
83
+		'bs-reboot' => ['dependencies' => ['bs-core', 'reboot']],
84
+		'bs-grid'   => ['styles' => 'bootstrap-grid'],
85 85
 
86
-		'bs-basic'  => [ 'dependencies' => [
86
+		'bs-basic'  => ['dependencies' => [
87 87
 			'bs-core', 'root', 'reboot', 'type', 'images', 'code', 'grid',
88 88
 			'tables', 'transitions', 'utilities', 'print'
89
-		] ],
89
+		]],
90 90
 
91
-		'bs-all'    => [ 'dependencies' => [
91
+		'bs-all'    => ['dependencies' => [
92 92
 			'bs-core', 'root', 'reboot', 'type', 'images', 'code', 'grid',
93 93
 			'tables', 'forms', 'buttons', 'transitions', 'dropdown',
94 94
 			'button-group', 'input-group', 'custom-forms', 'nav', 'navbar',
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 			'progress', 'media', 'list-group', 'close', 'toasts', 'modal', 'tooltip',
97 97
 			'popover', 'carousel', 'spinners', 'utilities', 'print', 'active-buttons',
98 98
 			'dismissable-alert', 'collapse', 'scrollspy', 'tab', 'js-util',
99
-		] ],
99
+		]],
100 100
 
101 101
 
102 102
 		// TODO: Add each SCSS util separately?
@@ -104,8 +104,8 @@  discard block
 block discarded – undo
104 104
 
105 105
 	];
106 106
 
107
-	static private $coreModules = [	'bs-core' ];
108
-	static private $optionalModules = [ 'bs-all' ];
107
+	static private $coreModules = ['bs-core'];
108
+	static private $optionalModules = ['bs-all'];
109 109
 
110 110
 	/**
111 111
 	 * @see ModuleDefinition::get
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
 	 * @return array
118 118
 	 * @throws InvalidArgumentException
119 119
 	 */
120
-	public function get( $key ) {
120
+	public function get($key) {
121 121
 
122
-		switch ( $key ) {
122
+		switch ($key) {
123 123
 			case 'core':
124 124
 				return self::$coreModules;
125 125
 			case 'optional':
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 				return self::$moduleDescriptions;
129 129
 		}
130 130
 
131
-		throw new InvalidArgumentException( 'Expected a valid key' );
131
+		throw new InvalidArgumentException('Expected a valid key');
132 132
 	}
133 133
 
134 134
 }
Please login to merge, or discard this patch.
src/Definition/ModuleDefinition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,6 +36,6 @@
 block discarded – undo
36 36
 	 * @param string $key
37 37
 	 * @return array
38 38
 	 */
39
-	public function get( $key );
39
+	public function get($key);
40 40
 
41 41
 }
Please login to merge, or discard this patch.
src/BootstrapManager.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
 	 *
50 50
 	 * @param ModuleDefinition $moduleDefinition
51 51
 	 */
52
-	public function __construct( ModuleDefinition $moduleDefinition ) {
52
+	public function __construct(ModuleDefinition $moduleDefinition) {
53 53
 		$this->moduleDefinition = $moduleDefinition;
54
-		$this->moduleDescriptions = $this->moduleDefinition->get( 'descriptions' );
54
+		$this->moduleDescriptions = $this->moduleDefinition->get('descriptions');
55 55
 	}
56 56
 
57 57
 	/**
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	public static function getInstance() {
65 65
 
66
-		if ( self::$instance === null ) {
67
-			self::$instance = new self( new V4ModuleDefinition );
66
+		if (self::$instance === null) {
67
+			self::$instance = new self(new V4ModuleDefinition);
68 68
 		}
69 69
 
70 70
 		return self::$instance;
@@ -84,29 +84,29 @@  discard block
 block discarded – undo
84 84
 	 *
85 85
 	 * @param string|string[] $modules
86 86
 	 */
87
-	public function addBootstrapModule( $modules ) {
87
+	public function addBootstrapModule($modules) {
88 88
 
89 89
 		$modules = (array) $modules;
90 90
 
91
-		foreach ( $modules as $module ) {
91
+		foreach ($modules as $module) {
92 92
 
93 93
 			// if the module is known
94
-			if ( isset( $this->moduleDescriptions[ $module ] ) ) {
94
+			if (isset($this->moduleDescriptions[$module])) {
95 95
 
96
-				$description = $this->moduleDescriptions[ $module ];
96
+				$description = $this->moduleDescriptions[$module];
97 97
 
98 98
 				// prevent adding this module again; this also prevents infinite recursion in case
99 99
 				// of dependency resolution
100
-				unset( $this->moduleDescriptions[ $module ] );
100
+				unset($this->moduleDescriptions[$module]);
101 101
 
102 102
 				// first add any dependencies recursively, so they are available when the styles and
103 103
 				// scripts of $module are loaded
104
-				if ( isset( $description[ 'dependencies' ] ) ) {
105
-					$this->addBootstrapModule( $description[ 'dependencies' ] );
104
+				if (isset($description['dependencies'])) {
105
+					$this->addBootstrapModule($description['dependencies']);
106 106
 				}
107 107
 
108
-				$this->addFilesToGlobalResourceModules( 'styles', $description );
109
-				$this->addFilesToGlobalResourceModules( 'scripts', $description );
108
+				$this->addFilesToGlobalResourceModules('styles', $description);
109
+				$this->addFilesToGlobalResourceModules('scripts', $description);
110 110
 
111 111
 			}
112 112
 		}
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
116 116
 	 * @param string       $filetype 'styles'|'scripts'
117 117
 	 * @param mixed[]      $description
118 118
 	 */
119
-	protected function addFilesToGlobalResourceModules ( $filetype, $description ) {
119
+	protected function addFilesToGlobalResourceModules($filetype, $description) {
120 120
 
121
-		if ( isset( $description[ $filetype ] ) ) {
121
+		if (isset($description[$filetype])) {
122 122
 
123
-			$this->adjustArrayElementOfResourceModuleDescription( $filetype, $description[ $filetype ], $filetype );
123
+			$this->adjustArrayElementOfResourceModuleDescription($filetype, $description[$filetype], $filetype);
124 124
 
125 125
 		}
126 126
 	}
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	 * @since  4.0
132 132
 	 */
133 133
 	public function addCoreBootstrapModules() {
134
-		$this->addBootstrapModule( $this->moduleDefinition->get( 'core' ) );
134
+		$this->addBootstrapModule($this->moduleDefinition->get('core'));
135 135
 	}
136 136
 
137 137
 	/**
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	 * @since  1.0
141 141
 	 */
142 142
 	public function addAllBootstrapModules() {
143
-		$this->addBootstrapModule( $this->moduleDefinition->get( 'optional' ) );
143
+		$this->addBootstrapModule($this->moduleDefinition->get('optional'));
144 144
 	}
145 145
 
146 146
 	/**
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
 	 *
152 152
 	 * @internal param string $path
153 153
 	 */
154
-	public function addStyleFile( $path, $position = 'main' ) {
155
-		$this->adjustArrayElementOfResourceModuleDescription( 'styles', [ $path => [ 'position' => $position ] ] );
154
+	public function addStyleFile($path, $position = 'main') {
155
+		$this->adjustArrayElementOfResourceModuleDescription('styles', [$path => ['position' => $position]]);
156 156
 	}
157 157
 
158 158
 	/**
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
 	 * @param string $key   the SCSS variable name
162 162
 	 * @param string $value the value to assign to the variable
163 163
 	 */
164
-	public function setScssVariable( $key, $value ) {
165
-		$this->setScssVariables( [ $key => $value ] );
164
+	public function setScssVariable($key, $value) {
165
+		$this->setScssVariables([$key => $value]);
166 166
 	}
167 167
 
168 168
 	/**
@@ -170,16 +170,16 @@  discard block
 block discarded – undo
170 170
 	 *
171 171
 	 * @param mixed[] $variables
172 172
 	 */
173
-	public function setScssVariables( $variables ) {
174
-		$this->adjustArrayElementOfResourceModuleDescription( 'variables', $variables );
173
+	public function setScssVariables($variables) {
174
+		$this->adjustArrayElementOfResourceModuleDescription('variables', $variables);
175 175
 	}
176 176
 
177 177
 	/**
178 178
 	 * @since 1.1
179 179
 	 * @param string|string[] $files
180 180
 	 */
181
-	public function addCacheTriggerFile( $files ){
182
-		$this->adjustArrayElementOfResourceModuleDescription( 'cacheTriggers', $files );
181
+	public function addCacheTriggerFile($files) {
182
+		$this->adjustArrayElementOfResourceModuleDescription('cacheTriggers', $files);
183 183
 	}
184 184
 
185 185
 	/**
@@ -187,15 +187,15 @@  discard block
 block discarded – undo
187 187
 	 * @param mixed  $value
188 188
 	 * @param string $filetype 'styles'|'scripts'
189 189
 	 */
190
-	protected function adjustArrayElementOfResourceModuleDescription( $key, $value, $filetype = 'styles' ) {
190
+	protected function adjustArrayElementOfResourceModuleDescription($key, $value, $filetype = 'styles') {
191 191
 
192
-		if (!isset($GLOBALS[ 'wgResourceModules' ][ 'ext.bootstrap.' . $filetype ][ $key ])) {
193
-			$GLOBALS[ 'wgResourceModules' ][ 'ext.bootstrap.' . $filetype ][ $key ] = [];
192
+		if (!isset($GLOBALS['wgResourceModules']['ext.bootstrap.' . $filetype][$key])) {
193
+			$GLOBALS['wgResourceModules']['ext.bootstrap.' . $filetype][$key] = [];
194 194
 		}
195 195
 
196
-		$GLOBALS[ 'wgResourceModules' ][ 'ext.bootstrap.' . $filetype ][ $key ] =
196
+		$GLOBALS['wgResourceModules']['ext.bootstrap.' . $filetype][$key] =
197 197
 			array_merge(
198
-				$GLOBALS[ 'wgResourceModules' ][ 'ext.bootstrap.' . $filetype ][ $key ],
198
+				$GLOBALS['wgResourceModules']['ext.bootstrap.' . $filetype][$key],
199 199
 				(array) $value
200 200
 			);
201 201
 	}
Please login to merge, or discard this patch.
src/Hooks/SetupAfterCache.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	 *
50 50
 	 * @param mixed[] $configuration
51 51
 	 */
52
-	public function __construct( array $configuration ) {
52
+	public function __construct(array $configuration) {
53 53
 		$this->configuration = $configuration;
54 54
 	}
55 55
 
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
 		$this->assertAcceptableConfiguration();
69 69
 
70 70
 		$this->registerResourceLoaderModules(
71
-			$this->isReadablePath( $this->configuration['localBasePath'] ),
72
-			$this->configuration[ 'remoteBasePath' ]
71
+			$this->isReadablePath($this->configuration['localBasePath']),
72
+			$this->configuration['remoteBasePath']
73 73
 		);
74 74
 
75 75
 		$this->registerCacheTriggers();
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
 	 * @param string $localBasePath
84 84
 	 * @param string $remoteBasePath
85 85
 	 */
86
-	protected function registerResourceLoaderModules( $localBasePath, $remoteBasePath ) {
86
+	protected function registerResourceLoaderModules($localBasePath, $remoteBasePath) {
87 87
 
88
-		$GLOBALS[ 'wgResourceModules' ][ 'ext.bootstrap.styles' ] = array_replace_recursive(
88
+		$GLOBALS['wgResourceModules']['ext.bootstrap.styles'] = array_replace_recursive(
89 89
 			[
90 90
 				'localBasePath' => $localBasePath . '/scss',
91 91
 				'remoteBasePath' => $remoteBasePath . '/scss',
@@ -99,20 +99,20 @@  discard block
 block discarded – undo
99 99
 					'composer.lock' => null,
100 100
 				],
101 101
 			],
102
-			array_key_exists( 'ext.bootstrap.styles', $GLOBALS[ 'wgResourceModules' ] ) ? $GLOBALS[ 'wgResourceModules' ][ 'ext.bootstrap.styles' ] : []
102
+			array_key_exists('ext.bootstrap.styles', $GLOBALS['wgResourceModules']) ? $GLOBALS['wgResourceModules']['ext.bootstrap.styles'] : []
103 103
 		);
104 104
 
105
-		$GLOBALS[ 'wgResourceModules' ][ 'ext.bootstrap.scripts' ] = array_replace_recursive(
105
+		$GLOBALS['wgResourceModules']['ext.bootstrap.scripts'] = array_replace_recursive(
106 106
 			[
107 107
 				'localBasePath'  => $localBasePath . '/js',
108 108
 				'remoteBasePath' => $remoteBasePath . '/js',
109 109
 				'scripts' => [],
110 110
 			],
111
-			array_key_exists( 'ext.bootstrap.scripts', $GLOBALS[ 'wgResourceModules' ] ) ? $GLOBALS[ 'wgResourceModules' ][ 'ext.bootstrap.scripts' ] : []
111
+			array_key_exists('ext.bootstrap.scripts', $GLOBALS['wgResourceModules']) ? $GLOBALS['wgResourceModules']['ext.bootstrap.scripts'] : []
112 112
 		);
113 113
 
114
-		$GLOBALS[ 'wgResourceModules' ][ 'ext.bootstrap' ] = [
115
-			'dependencies' => [ 'ext.bootstrap.styles', 'ext.bootstrap.scripts' ],
114
+		$GLOBALS['wgResourceModules']['ext.bootstrap'] = [
115
+			'dependencies' => ['ext.bootstrap.styles', 'ext.bootstrap.scripts'],
116 116
 		];
117 117
 	}
118 118
 
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
 	 * @param string $id
121 121
 	 * @return bool
122 122
 	 */
123
-	protected function hasConfiguration( $id ) {
124
-		return isset( $this->configuration[ $id ] );
123
+	protected function hasConfiguration($id) {
124
+		return isset($this->configuration[$id]);
125 125
 	}
126 126
 
127 127
 	/**
@@ -129,28 +129,28 @@  discard block
 block discarded – undo
129 129
 	 * @return string
130 130
 	 * @throws RuntimeException
131 131
 	 */
132
-	protected function isReadablePath( $localBasePath ) {
132
+	protected function isReadablePath($localBasePath) {
133 133
 
134
-		$localBasePath = str_replace( [ '\\', '/' ], DIRECTORY_SEPARATOR, $localBasePath );
134
+		$localBasePath = str_replace(['\\', '/'], DIRECTORY_SEPARATOR, $localBasePath);
135 135
 
136
-		if ( is_readable( $localBasePath ) ) {
136
+		if (is_readable($localBasePath)) {
137 137
 			return $localBasePath;
138 138
 		}
139 139
 
140
-		throw new RuntimeException( "Expected an accessible {$localBasePath} path" );
140
+		throw new RuntimeException("Expected an accessible {$localBasePath} path");
141 141
 	}
142 142
 
143 143
 	protected function registerCacheTriggers() {
144 144
 
145 145
 		$defaultRecacheTriggers = [
146
-			'LocalSettings.php' => $this->configuration[ 'IP' ] . '/LocalSettings.php',
147
-			'composer.lock' => $this->configuration[ 'IP' ] . '/composer.lock',
146
+			'LocalSettings.php' => $this->configuration['IP'] . '/LocalSettings.php',
147
+			'composer.lock' => $this->configuration['IP'] . '/composer.lock',
148 148
 		];
149 149
 
150
-		foreach ( $defaultRecacheTriggers as $key => $filename ) {
151
-			if ( array_key_exists( $key, $GLOBALS[ 'wgResourceModules' ][ 'ext.bootstrap.styles' ][ 'cacheTriggers' ] ) &&
152
-				$GLOBALS[ 'wgResourceModules' ][ 'ext.bootstrap.styles' ][ 'cacheTriggers' ][ $key ] === null ) {
153
-				$GLOBALS[ 'wgResourceModules' ][ 'ext.bootstrap.styles' ][ 'cacheTriggers' ][ $key ] = $filename;
150
+		foreach ($defaultRecacheTriggers as $key => $filename) {
151
+			if (array_key_exists($key, $GLOBALS['wgResourceModules']['ext.bootstrap.styles']['cacheTriggers']) &&
152
+				$GLOBALS['wgResourceModules']['ext.bootstrap.styles']['cacheTriggers'][$key] === null) {
153
+				$GLOBALS['wgResourceModules']['ext.bootstrap.styles']['cacheTriggers'][$key] = $filename;
154 154
 			}
155 155
 		}
156 156
 	}
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
 			'IP' => 'Full path to working directory ($IP) not found.',
164 164
 		];
165 165
 
166
-		foreach ( $configElements as $key => $errorMessage ) {
167
-			if ( !$this->hasConfiguration( $key ) ) {
168
-				throw new InvalidArgumentException( $errorMessage );
166
+		foreach ($configElements as $key => $errorMessage) {
167
+			if (!$this->hasConfiguration($key)) {
168
+				throw new InvalidArgumentException($errorMessage);
169 169
 			}
170 170
 		}
171 171
 	}
Please login to merge, or discard this patch.