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