Completed
Push — master ( babb90...6935f1 )
by J.D.
04:21
created
src/classes/hook/extension/miss/listeneri.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -20,6 +20,7 @@
 block discarded – undo
20 20
 	 * @since 2.1.0
21 21
 	 *
22 22
 	 * @param WordPoints_Hook_Fire $fire The fire that was a miss.
23
+	 * @return void
23 24
 	 */
24 25
 	public function after_miss( WordPoints_Hook_Fire $fire );
25 26
 }
Please login to merge, or discard this patch.
src/classes/hook/settingsi.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -38,6 +38,7 @@
 block discarded – undo
38 38
 	 *
39 39
 	 * @param WordPoints_Hook_ReactionI $reaction The reaction object.
40 40
 	 * @param array                     $settings The settings for a hook reaction.
41
+	 * @return void
41 42
 	 */
42 43
 	public function update_settings(
43 44
 		WordPoints_Hook_ReactionI $reaction,
Please login to merge, or discard this patch.
src/components/points/classes/logs/viewing/restrictioni.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -18,6 +18,7 @@
 block discarded – undo
18 18
 	 * @since 2.2.0
19 19
 	 *
20 20
 	 * @param object $log The object for the points log the restriction is for.
21
+	 * @return void
21 22
 	 */
22 23
 	public function __construct( $log );
23 24
 
Please login to merge, or discard this patch.
src/classes/shortcode.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -280,7 +280,7 @@
 block discarded – undo
280 280
 	 *
281 281
 	 * @since 1.8.0
282 282
 	 *
283
-	 * @return string|WP_Error|null An error message or object on failure.
283
+	 * @return string|null An error message or object on failure.
284 284
 	 */
285 285
 	protected function verify_atts() {
286 286
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -171,9 +171,9 @@  discard block
 block discarded – undo
171 171
 	protected function verify_atts() {
172 172
 
173 173
 		// If this shortcode supports the user_id attribute, verify it.
174
-		if ( isset( $this->pairs['user_id'] ) ) {
174
+		if ( isset( $this->pairs[ 'user_id' ] ) ) {
175 175
 
176
-			if ( 'post_author' === $this->atts['user_id'] ) {
176
+			if ( 'post_author' === $this->atts[ 'user_id' ] ) {
177 177
 
178 178
 				$post = get_post();
179 179
 
@@ -186,13 +186,13 @@  discard block
 block discarded – undo
186 186
 					);
187 187
 				}
188 188
 
189
-				$this->atts['user_id'] = $post->post_author;
189
+				$this->atts[ 'user_id' ] = $post->post_author;
190 190
 
191
-			} elseif ( ! $this->atts['user_id'] ) {
191
+			} elseif ( ! $this->atts[ 'user_id' ] ) {
192 192
 
193
-				$this->atts['user_id'] = get_current_user_id();
193
+				$this->atts[ 'user_id' ] = get_current_user_id();
194 194
 
195
-			} elseif ( ! wordpoints_posint( $this->atts['user_id'] ) ) {
195
+			} elseif ( ! wordpoints_posint( $this->atts[ 'user_id' ] ) ) {
196 196
 
197 197
 				return sprintf(
198 198
 					// translators: 1. Attribute name; 2. Shortcode name; 3. Expected value.
Please login to merge, or discard this patch.
src/classes/un/installer/base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -697,7 +697,7 @@
 block discarded – undo
697 697
 	 * @since 2.0.0
698 698
 	 *
699 699
 	 * @param string $option The name of the option to set.
700
-	 * @param mixed  $value  The value of the option.
700
+	 * @param string  $value  The value of the option.
701 701
 	 */
702 702
 	private function _set_option( $option, $value = true ) {
703 703
 
Please login to merge, or discard this patch.
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -922,7 +922,7 @@  discard block
 block discarded – undo
922 922
 		$option_name = $this->_get_installed_site_ids_option_name();
923 923
 
924 924
 		$sites = wordpoints_get_array_option( $option_name, 'site' );
925
-		$sites[] = $id;
925
+		$sites[ ] = $id;
926 926
 
927 927
 		update_site_option( $option_name, $sites );
928 928
 	}
@@ -984,12 +984,12 @@  discard block
 block discarded – undo
984 984
 
985 985
 		if ( 'wordpoints' === $this->slug ) {
986 986
 
987
-			if ( isset( $wordpoints_data['version'] ) ) {
988
-				return $wordpoints_data['version'];
987
+			if ( isset( $wordpoints_data[ 'version' ] ) ) {
988
+				return $wordpoints_data[ 'version' ];
989 989
 			}
990 990
 
991
-		} elseif ( isset( $wordpoints_data[ "{$this->type}s" ][ $this->slug ]['version'] ) ) {
992
-			return $wordpoints_data[ "{$this->type}s" ][ $this->slug ]['version'];
991
+		} elseif ( isset( $wordpoints_data[ "{$this->type}s" ][ $this->slug ][ 'version' ] ) ) {
992
+			return $wordpoints_data[ "{$this->type}s" ][ $this->slug ][ 'version' ];
993 993
 		}
994 994
 
995 995
 		return false;
@@ -1016,9 +1016,9 @@  discard block
 block discarded – undo
1016 1016
 		}
1017 1017
 
1018 1018
 		if ( 'wordpoints' === $this->slug ) {
1019
-			$wordpoints_data['version'] = $version;
1019
+			$wordpoints_data[ 'version' ] = $version;
1020 1020
 		} else {
1021
-			$wordpoints_data[ "{$this->type}s" ][ $this->slug ]['version'] = $version;
1021
+			$wordpoints_data[ "{$this->type}s" ][ $this->slug ][ 'version' ] = $version;
1022 1022
 		}
1023 1023
 
1024 1024
 		if ( $this->network_wide ) {
@@ -1074,8 +1074,8 @@  discard block
 block discarded – undo
1074 1074
 			'wordpoints_data'
1075 1075
 		);
1076 1076
 
1077
-		if ( empty( $wordpoints_data['components'][ $component ]['version'] ) ) {
1078
-			$wordpoints_data['components'][ $component ]['version'] = $version;
1077
+		if ( empty( $wordpoints_data[ 'components' ][ $component ][ 'version' ] ) ) {
1078
+			$wordpoints_data[ 'components' ][ $component ][ 'version' ] = $version;
1079 1079
 		}
1080 1080
 
1081 1081
 		wordpoints_update_maybe_network_option( 'wordpoints_data', $wordpoints_data );
@@ -1096,7 +1096,7 @@  discard block
 block discarded – undo
1096 1096
 		$this->custom_caps_keys = array_keys( $this->custom_caps );
1097 1097
 
1098 1098
 		if ( 'uninstall' === $this->action ) {
1099
-			$this->uninstall['local']['custom_caps'] = true;
1099
+			$this->uninstall[ 'local' ][ 'custom_caps' ] = true;
1100 1100
 		}
1101 1101
 	}
1102 1102
 
@@ -1145,7 +1145,7 @@  discard block
 block discarded – undo
1145 1145
 	 */
1146 1146
 	public function get_db_schema() {
1147 1147
 
1148
-		if ( ! isset( $this->schema[ $this->context ]['tables'] ) ) {
1148
+		if ( ! isset( $this->schema[ $this->context ][ 'tables' ] ) ) {
1149 1149
 			return '';
1150 1150
 		}
1151 1151
 
@@ -1161,7 +1161,7 @@  discard block
 block discarded – undo
1161 1161
 			$prefix = $wpdb->base_prefix;
1162 1162
 		}
1163 1163
 
1164
-		foreach ( $this->schema[ $this->context ]['tables'] as $table_name => $table_schema ) {
1164
+		foreach ( $this->schema[ $this->context ][ 'tables' ] as $table_name => $table_schema ) {
1165 1165
 
1166 1166
 			$table_name   = str_replace( '`', '``', $table_name );
1167 1167
 			$table_schema = trim( $table_schema );
@@ -1191,18 +1191,18 @@  discard block
 block discarded – undo
1191 1191
 		// Add any tables to uninstall based on the db schema.
1192 1192
 		foreach ( $this->schema as $context => $schema ) {
1193 1193
 
1194
-			if ( ! isset( $schema['tables'] ) ) {
1194
+			if ( ! isset( $schema[ 'tables' ] ) ) {
1195 1195
 				continue;
1196 1196
 			}
1197 1197
 
1198
-			if ( ! isset( $this->uninstall[ $context ]['tables'] ) ) {
1199
-				$this->uninstall[ $context ]['tables'] = array();
1198
+			if ( ! isset( $this->uninstall[ $context ][ 'tables' ] ) ) {
1199
+				$this->uninstall[ $context ][ 'tables' ] = array();
1200 1200
 			}
1201 1201
 
1202
-			$this->uninstall[ $context ]['tables'] = array_unique(
1202
+			$this->uninstall[ $context ][ 'tables' ] = array_unique(
1203 1203
 				array_merge(
1204
-					$this->uninstall[ $context ]['tables']
1205
-					, array_keys( $schema['tables'] )
1204
+					$this->uninstall[ $context ][ 'tables' ]
1205
+					, array_keys( $schema[ 'tables' ] )
1206 1206
 				)
1207 1207
 			);
1208 1208
 		}
@@ -1242,7 +1242,7 @@  discard block
 block discarded – undo
1242 1242
 	 */
1243 1243
 	protected function prepare_uninstall_list_tables() {
1244 1244
 
1245
-		if ( ! isset( $this->uninstall['list_tables'] ) ) {
1245
+		if ( ! isset( $this->uninstall[ 'list_tables' ] ) ) {
1246 1246
 			return;
1247 1247
 		}
1248 1248
 
@@ -1253,14 +1253,14 @@  discard block
 block discarded – undo
1253 1253
 		);
1254 1254
 
1255 1255
 		// Loop through all of the list table screens.
1256
-		foreach ( $this->uninstall['list_tables'] as $screen_id => $args ) {
1256
+		foreach ( $this->uninstall[ 'list_tables' ] as $screen_id => $args ) {
1257 1257
 
1258 1258
 			// Back-compat for pre-2.1.0.
1259
-			if ( isset( $args['parent'] ) && '_page' === substr( $args['parent'], -5 /* _page */ ) ) {
1260
-				$args['parent'] = substr( $args['parent'], 0, -5 );
1259
+			if ( isset( $args[ 'parent' ] ) && '_page' === substr( $args[ 'parent' ], -5 /* _page */ ) ) {
1260
+				$args[ 'parent' ] = substr( $args[ 'parent' ], 0, -5 );
1261 1261
 			}
1262 1262
 
1263
-			$this->uninstall['universal']['list_tables'][ $screen_id ] = $args;
1263
+			$this->uninstall[ 'universal' ][ 'list_tables' ][ $screen_id ] = $args;
1264 1264
 		}
1265 1265
 
1266 1266
 		$this->prepare_uninstall_non_per_site_items( 'list_tables' );
@@ -1283,20 +1283,20 @@  discard block
 block discarded – undo
1283 1283
 	 */
1284 1284
 	protected function prepare_uninstall_non_per_site_items( $items_key ) {
1285 1285
 
1286
-		if ( isset( $this->uninstall['universal'][ $items_key ] ) ) {
1286
+		if ( isset( $this->uninstall[ 'universal' ][ $items_key ] ) ) {
1287 1287
 
1288
-			$this->uninstall['global'][ $items_key ]
1289
-				= $this->uninstall['universal'][ $items_key ];
1288
+			$this->uninstall[ 'global' ][ $items_key ]
1289
+				= $this->uninstall[ 'universal' ][ $items_key ];
1290 1290
 
1291
-			unset( $this->uninstall['universal'][ $items_key ] );
1291
+			unset( $this->uninstall[ 'universal' ][ $items_key ] );
1292 1292
 		}
1293 1293
 
1294
-		if ( isset( $this->uninstall['site'][ $items_key ] ) ) {
1294
+		if ( isset( $this->uninstall[ 'site' ][ $items_key ] ) ) {
1295 1295
 
1296
-			$this->uninstall['network'][ $items_key ]
1297
-				= $this->uninstall['site'][ $items_key ];
1296
+			$this->uninstall[ 'network' ][ $items_key ]
1297
+				= $this->uninstall[ 'site' ][ $items_key ];
1298 1298
 
1299
-			unset( $this->uninstall['site'][ $items_key ] );
1299
+			unset( $this->uninstall[ 'site' ][ $items_key ] );
1300 1300
 		}
1301 1301
 	}
1302 1302
 
@@ -1346,7 +1346,7 @@  discard block
 block discarded – undo
1346 1346
 			}
1347 1347
 
1348 1348
 			foreach ( $this->uninstall[ $type ][ $shortcut ] as $slug ) {
1349
-				$this->uninstall[ $type ][ $canonical ][] = $args['prefix'] . $slug;
1349
+				$this->uninstall[ $type ][ $canonical ][ ] = $args[ 'prefix' ] . $slug;
1350 1350
 			}
1351 1351
 		}
1352 1352
 	}
@@ -1459,7 +1459,7 @@  discard block
 block discarded – undo
1459 1459
 			$prefix = $wpdb->prefix;
1460 1460
 		}
1461 1461
 
1462
-		foreach ( $this->schema[ $type ]['tables'] as $table_name => $schema ) {
1462
+		foreach ( $this->schema[ $type ][ 'tables' ] as $table_name => $schema ) {
1463 1463
 			maybe_convert_table_to_utf8mb4( $prefix . $table_name );
1464 1464
 		}
1465 1465
 	}
@@ -1489,31 +1489,31 @@  discard block
 block discarded – undo
1489 1489
 			, $this->uninstall[ $type ]
1490 1490
 		);
1491 1491
 
1492
-		if ( ! empty( $uninstall['custom_caps'] ) ) {
1492
+		if ( ! empty( $uninstall[ 'custom_caps' ] ) ) {
1493 1493
 			$this->uninstall_custom_caps( $this->custom_caps_keys );
1494 1494
 		}
1495 1495
 
1496
-		foreach ( $uninstall['user_meta'] as $meta_key ) {
1496
+		foreach ( $uninstall[ 'user_meta' ] as $meta_key ) {
1497 1497
 			$this->uninstall_metadata( 'user', $meta_key );
1498 1498
 		}
1499 1499
 
1500
-		foreach ( $uninstall['options'] as $option ) {
1500
+		foreach ( $uninstall[ 'options' ] as $option ) {
1501 1501
 			$this->uninstall_option( $option );
1502 1502
 		}
1503 1503
 
1504
-		foreach ( $uninstall['tables'] as $table ) {
1504
+		foreach ( $uninstall[ 'tables' ] as $table ) {
1505 1505
 			$this->uninstall_table( $table );
1506 1506
 		}
1507 1507
 
1508
-		foreach ( $uninstall['comment_meta'] as $meta_key ) {
1508
+		foreach ( $uninstall[ 'comment_meta' ] as $meta_key ) {
1509 1509
 			$this->uninstall_metadata( 'comment', $meta_key );
1510 1510
 		}
1511 1511
 
1512
-		foreach ( $uninstall['meta_boxes'] as $screen_id => $args ) {
1512
+		foreach ( $uninstall[ 'meta_boxes' ] as $screen_id => $args ) {
1513 1513
 			$this->uninstall_meta_boxes( $screen_id, $args );
1514 1514
 		}
1515 1515
 
1516
-		foreach ( $uninstall['list_tables'] as $screen_id => $args ) {
1516
+		foreach ( $uninstall[ 'list_tables' ] as $screen_id => $args ) {
1517 1517
 			$this->uninstall_list_table( $screen_id, $args );
1518 1518
 		}
1519 1519
 	}
@@ -1541,7 +1541,7 @@  discard block
 block discarded – undo
1541 1541
 	protected function uninstall_metadata( $type, $key ) {
1542 1542
 
1543 1543
 		if ( 'user' === $type && 'site' === $this->context ) {
1544
-			$key = $GLOBALS['wpdb']->get_blog_prefix() . $key;
1544
+			$key = $GLOBALS[ 'wpdb' ]->get_blog_prefix() . $key;
1545 1545
 		}
1546 1546
 
1547 1547
 		if ( false !== strpos( $key, '%' ) ) {
@@ -1608,20 +1608,20 @@  discard block
 block discarded – undo
1608 1608
 		);
1609 1609
 
1610 1610
 		$args = array_merge( $defaults, $args );
1611
-		$args['options'] = array_merge( $defaults['options'], $args['options'] );
1611
+		$args[ 'options' ] = array_merge( $defaults[ 'options' ], $args[ 'options' ] );
1612 1612
 
1613 1613
 		// Each user gets to set the options to their liking.
1614
-		foreach ( $args['options'] as $option ) {
1614
+		foreach ( $args[ 'options' ] as $option ) {
1615 1615
 
1616 1616
 			$this->uninstall_metadata(
1617 1617
 				'user'
1618
-				, "{$option}_{$args['parent']}_page_{$screen_id}"
1618
+				, "{$option}_{$args[ 'parent' ]}_page_{$screen_id}"
1619 1619
 			);
1620 1620
 
1621 1621
 			if ( 'network' === $this->context ) {
1622 1622
 				$this->uninstall_metadata(
1623 1623
 					'user'
1624
-					, "{$option}_{$args['parent']}_page_{$screen_id}-network"
1624
+					, "{$option}_{$args[ 'parent' ]}_page_{$screen_id}-network"
1625 1625
 				);
1626 1626
 			}
1627 1627
 		}
@@ -1668,7 +1668,7 @@  discard block
 block discarded – undo
1668 1668
 
1669 1669
 		$args = array_merge( $defaults, $args );
1670 1670
 
1671
-		$network_parent = $args['parent'];
1671
+		$network_parent = $args[ 'parent' ];
1672 1672
 		$parent = $network_parent;
1673 1673
 
1674 1674
 		// The parent page is usually the same on a multisite site, but we need to
@@ -1680,20 +1680,20 @@  discard block
 block discarded – undo
1680 1680
 		$meta_keys = array();
1681 1681
 
1682 1682
 		// Each user can hide specific columns of the table.
1683
-		$meta_keys[] = "manage{$parent}_page_{$screen_id}columnshidden";
1683
+		$meta_keys[ ] = "manage{$parent}_page_{$screen_id}columnshidden";
1684 1684
 
1685 1685
 		if ( 'network' === $this->context ) {
1686
-			$meta_keys[] = "manage{$network_parent}_page_{$screen_id}-networkcolumnshidden";
1686
+			$meta_keys[ ] = "manage{$network_parent}_page_{$screen_id}-networkcolumnshidden";
1687 1687
 		}
1688 1688
 
1689 1689
 		// Loop through each of the other options provided by this list table.
1690
-		foreach ( $args['options'] as $option ) {
1690
+		foreach ( $args[ 'options' ] as $option ) {
1691 1691
 
1692 1692
 			// Each user gets to set the options to their liking.
1693
-			$meta_keys[]  = "{$parent}_page_{$screen_id}_{$option}";
1693
+			$meta_keys[ ]  = "{$parent}_page_{$screen_id}_{$option}";
1694 1694
 
1695 1695
 			if ( 'network' === $this->context ) {
1696
-				$meta_keys[] = "{$network_parent}_page_{$screen_id}_network_{$option}";
1696
+				$meta_keys[ ] = "{$network_parent}_page_{$screen_id}_network_{$option}";
1697 1697
 			}
1698 1698
 		}
1699 1699
 
@@ -1857,7 +1857,7 @@  discard block
 block discarded – undo
1857 1857
 	 */
1858 1858
 	protected function install_site() {
1859 1859
 
1860
-		if ( isset( $this->schema['site'] ) ) {
1860
+		if ( isset( $this->schema[ 'site' ] ) ) {
1861 1861
 			$this->install_db_schema();
1862 1862
 		}
1863 1863
 
@@ -1921,7 +1921,7 @@  discard block
 block discarded – undo
1921 1921
 	 */
1922 1922
 	protected function uninstall_network() {
1923 1923
 
1924
-		if ( ! empty( $this->uninstall['network'] ) ) {
1924
+		if ( ! empty( $this->uninstall[ 'network' ] ) ) {
1925 1925
 			$this->uninstall_( 'network' );
1926 1926
 		}
1927 1927
 
@@ -1939,7 +1939,7 @@  discard block
 block discarded – undo
1939 1939
 	 */
1940 1940
 	protected function uninstall_site() {
1941 1941
 
1942
-		if ( ! empty( $this->uninstall['site'] ) ) {
1942
+		if ( ! empty( $this->uninstall[ 'site' ] ) ) {
1943 1943
 			$this->uninstall_( 'site' );
1944 1944
 		}
1945 1945
 
@@ -1957,7 +1957,7 @@  discard block
 block discarded – undo
1957 1957
 	 */
1958 1958
 	protected function uninstall_single() {
1959 1959
 
1960
-		if ( ! empty( $this->uninstall['single'] ) ) {
1960
+		if ( ! empty( $this->uninstall[ 'single' ] ) ) {
1961 1961
 			$this->uninstall_( 'single' );
1962 1962
 		}
1963 1963
 
Please login to merge, or discard this patch.
src/includes/maintenance.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 }
21 21
 
22 22
 // If we're not running a module check, let the maintenance message show.
23
-if ( ! isset( $_GET['wordpoints_module_check'], $_GET['check_module'] ) ) { // WPCS: CSRF OK.
23
+if ( ! isset( $_GET[ 'wordpoints_module_check' ], $_GET[ 'check_module' ] ) ) { // WPCS: CSRF OK.
24 24
 	return;
25 25
 }
26 26
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,8 @@
 block discarded – undo
20 20
 }
21 21
 
22 22
 // If we're not running a module check, let the maintenance message show.
23
-if ( ! isset( $_GET['wordpoints_module_check'], $_GET['check_module'] ) ) { // WPCS: CSRF OK.
23
+if ( ! isset( $_GET['wordpoints_module_check'], $_GET['check_module'] ) ) {
24
+// WPCS: CSRF OK.
24 25
 	return;
25 26
 }
26 27
 
Please login to merge, or discard this patch.
src/includes/filters.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 add_action( 'admin_notices', 'WordPoints_Installables::admin_notices' );
29 29
 add_action( 'wpmu_new_blog', 'WordPoints_Installables::wpmu_new_blog' );
30 30
 
31
-if ( isset( $_GET['wordpoints_module_check'], $_GET['check_module'] ) ) { // WPCS: CSRF OK.
31
+if ( isset( $_GET[ 'wordpoints_module_check' ], $_GET[ 'check_module' ] ) ) { // WPCS: CSRF OK.
32 32
 
33 33
 	add_action( 'shutdown', 'wordpoints_maintenance_shutdown_print_rand_str' );
34 34
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,8 @@
 block discarded – undo
28 28
 add_action( 'admin_notices', 'WordPoints_Installables::admin_notices' );
29 29
 add_action( 'wpmu_new_blog', 'WordPoints_Installables::wpmu_new_blog' );
30 30
 
31
-if ( isset( $_GET['wordpoints_module_check'], $_GET['check_module'] ) ) { // WPCS: CSRF OK.
31
+if ( isset( $_GET['wordpoints_module_check'], $_GET['check_module'] ) ) {
32
+// WPCS: CSRF OK.
32 33
 
33 34
 	add_action( 'shutdown', 'wordpoints_maintenance_shutdown_print_rand_str' );
34 35
 
Please login to merge, or discard this patch.
src/admin/includes/class-wordpoints-module-installer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
 			if ( $wp_filesystem->mkdir( $modules_dir, FS_CHMOD_DIR ) ) {
90 90
 				$wp_filesystem->put_contents( $modules_dir . '/index.php', '<?php // Gold is silent.' );
91 91
 			} else {
92
-				return new WP_Error( 'mkdir_failed_modules', $this->strings['mkdir_failed_modules'], $modules_dir );
92
+				return new WP_Error( 'mkdir_failed_modules', $this->strings[ 'mkdir_failed_modules' ], $modules_dir );
93 93
 			}
94 94
 		}
95 95
 
96 96
 		$module_dir = wordpoints_modules_dir();
97
-		$wp_theme_directories[] = $module_dir;
97
+		$wp_theme_directories[ ] = $module_dir;
98 98
 
99 99
 		$result = parent::install_package( $args );
100 100
 
@@ -188,14 +188,14 @@  discard block
 block discarded – undo
188 188
 
189 189
 			$module_data = wordpoints_get_module_data( $file, false, false );
190 190
 
191
-			if ( ! empty( $module_data['name'] ) ) {
191
+			if ( ! empty( $module_data[ 'name' ] ) ) {
192 192
 				$modules_found = true;
193 193
 				break;
194 194
 			}
195 195
 		}
196 196
 
197 197
 		if ( ! $modules_found ) {
198
-			return new WP_Error( 'incompatible_archive_no_modules', $this->strings['incompatible_archive'], esc_html__( 'No valid modules were found.', 'wordpoints' ) );
198
+			return new WP_Error( 'incompatible_archive_no_modules', $this->strings[ 'incompatible_archive' ], esc_html__( 'No valid modules were found.', 'wordpoints' ) );
199 199
 		}
200 200
 
201 201
 		return $source;
@@ -212,11 +212,11 @@  discard block
 block discarded – undo
212 212
 	 */
213 213
 	public function module_info() {
214 214
 
215
-		if ( ! is_array( $this->result ) || empty( $this->result['destination_name'] ) ) {
215
+		if ( ! is_array( $this->result ) || empty( $this->result[ 'destination_name' ] ) ) {
216 216
 			return false;
217 217
 		}
218 218
 
219
-		$module = wordpoints_get_modules( '/' . $this->result['destination_name'] );
219
+		$module = wordpoints_get_modules( '/' . $this->result[ 'destination_name' ] );
220 220
 
221 221
 		if ( empty( $module ) ) {
222 222
 			return false;
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 		// Assume the requested module is the first in the list.
226 226
 		$module_files = array_keys( $module );
227 227
 
228
-		return $this->result['destination_name'] . '/' . $module_files[0];
228
+		return $this->result[ 'destination_name' ] . '/' . $module_files[ 0 ];
229 229
 	}
230 230
 
231 231
 } // class WordPoints_Module_Installer
Please login to merge, or discard this patch.
src/admin/includes/class-wordpoints-module-installer-skin.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
 		$args = array_merge( $defaults, $args );
63 63
 
64
-		$this->type = $args['type'];
64
+		$this->type = $args[ 'type' ];
65 65
 
66 66
 		parent::__construct( $args );
67 67
 	}
@@ -85,16 +85,16 @@  discard block
 block discarded – undo
85 85
 
86 86
 			if ( is_multisite() && current_user_can( 'manage_network_wordpoints_modules' ) ) {
87 87
 
88
-				$install_actions['network_activate'] = '<a class="button button-primary" href="' . wp_nonce_url( self_admin_url( 'admin.php?page=wordpoints_modules&action=activate&amp;networkwide=1&amp;module=' . rawurlencode( $module_file ) ), "activate-module_{$module_file}" ) . '" target="_parent">' . esc_html__( 'Network Activate', 'wordpoints' ) . '</a>';
88
+				$install_actions[ 'network_activate' ] = '<a class="button button-primary" href="' . wp_nonce_url( self_admin_url( 'admin.php?page=wordpoints_modules&action=activate&amp;networkwide=1&amp;module=' . rawurlencode( $module_file ) ), "activate-module_{$module_file}" ) . '" target="_parent">' . esc_html__( 'Network Activate', 'wordpoints' ) . '</a>';
89 89
 
90 90
 			} elseif ( current_user_can( 'activate_wordpoints_modules' ) ) {
91 91
 
92
-				$install_actions['activate_module'] = '<a class="button button-primary" href="' . wp_nonce_url( self_admin_url( 'admin.php?page=wordpoints_modules&action=activate&amp;module=' . rawurlencode( $module_file ) ), "activate-module_{$module_file}" ) . '" target="_parent">' . esc_html__( 'Activate Module', 'wordpoints' ) . '</a>';
92
+				$install_actions[ 'activate_module' ] = '<a class="button button-primary" href="' . wp_nonce_url( self_admin_url( 'admin.php?page=wordpoints_modules&action=activate&amp;module=' . rawurlencode( $module_file ) ), "activate-module_{$module_file}" ) . '" target="_parent">' . esc_html__( 'Activate Module', 'wordpoints' ) . '</a>';
93 93
 			}
94 94
 		}
95 95
 
96
-		$install_actions['modules_page'] = '<a href="' . esc_url( self_admin_url( 'admin.php?page=wordpoints_modules' ) ) . '" target="_parent">' . esc_html__( 'Return to Modules page', 'wordpoints' ) . '</a>';
97
-		$install_actions['install_page'] = '<a href="' . esc_url( self_admin_url( 'admin.php?page=wordpoints_install_modules' ) ) . '" target="_parent">' . esc_html__( 'Return to Module Installer', 'wordpoints' ) . '</a>';
96
+		$install_actions[ 'modules_page' ] = '<a href="' . esc_url( self_admin_url( 'admin.php?page=wordpoints_modules' ) ) . '" target="_parent">' . esc_html__( 'Return to Modules page', 'wordpoints' ) . '</a>';
97
+		$install_actions[ 'install_page' ] = '<a href="' . esc_url( self_admin_url( 'admin.php?page=wordpoints_install_modules' ) ) . '" target="_parent">' . esc_html__( 'Return to Module Installer', 'wordpoints' ) . '</a>';
98 98
 
99 99
 		/**
100 100
 		 * The install module action links.
Please login to merge, or discard this patch.