Completed
Push — master ( 9bbfca...6621c7 )
by J.D.
03:38
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/modules.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
 	$module_data = wordpoints_get_module_data( wordpoints_modules_dir() . '/' . $module );
71 71
 
72
-	return $module_data['network'];
72
+	return $module_data[ 'network' ];
73 73
 }
74 74
 
75 75
 /**
@@ -257,17 +257,17 @@  discard block
 block discarded – undo
257 257
 
258 258
 	$module_data = WordPoints_Modules::get_data( $module_file );
259 259
 
260
-	if ( $module_data && wp_normalize_path( $module_file ) === $module_data['raw_file'] ) {
261
-		unset( $module_data['raw'], $module_data['raw_file'] );
260
+	if ( $module_data && wp_normalize_path( $module_file ) === $module_data[ 'raw_file' ] ) {
261
+		unset( $module_data[ 'raw' ], $module_data[ 'raw_file' ] );
262 262
 	} else {
263 263
 		$module_data = get_file_data( $module_file, $default_headers, 'wordpoints_module' );
264 264
 	}
265 265
 
266
-	if ( ! empty( $module_data['update_api'] ) ) {
266
+	if ( ! empty( $module_data[ 'update_api' ] ) ) {
267 267
 		_deprecated_argument( __FUNCTION__, '1.10.0', 'The "Update API" module header has been deprecated in favor of "Channel".' );
268 268
 	}
269 269
 
270
-	$module_data['network'] = ( 'true' === strtolower( $module_data['network'] ) );
270
+	$module_data[ 'network' ] = ( 'true' === strtolower( $module_data[ 'network' ] ) );
271 271
 
272 272
 	if ( $markup || $translate ) {
273 273
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 		// Translate fields
278 278
 		if ( $translate ) {
279 279
 
280
-			$textdomain = $module_data['text_domain'];
280
+			$textdomain = $module_data[ 'text_domain' ];
281 281
 
282 282
 			if ( $textdomain ) {
283 283
 
@@ -285,8 +285,8 @@  discard block
 block discarded – undo
285 285
 
286 286
 					$domain_path = dirname( $module_file );
287 287
 
288
-					if ( $module_data['domain_path'] ) {
289
-						$domain_path .= $module_data['domain_path'];
288
+					if ( $module_data[ 'domain_path' ] ) {
289
+						$domain_path .= $module_data[ 'domain_path' ];
290 290
 					}
291 291
 
292 292
 					wordpoints_load_module_textdomain( $textdomain, $domain_path );
@@ -309,48 +309,48 @@  discard block
 block discarded – undo
309 309
 		);
310 310
 
311 311
 		$allowed_tags = $allowed_tags_in_links;
312
-		$allowed_tags['a'] = array( 'href' => true, 'title' => true );
312
+		$allowed_tags[ 'a' ] = array( 'href' => true, 'title' => true );
313 313
 
314 314
 		// Name and author ar marked up inside <a> tags. Don't allow these.
315
-		$module_data['name']   = wp_kses( $module_data['name'],   $allowed_tags_in_links );
316
-		$module_data['author'] = wp_kses( $module_data['author'], $allowed_tags_in_links );
315
+		$module_data[ 'name' ]   = wp_kses( $module_data[ 'name' ], $allowed_tags_in_links );
316
+		$module_data[ 'author' ] = wp_kses( $module_data[ 'author' ], $allowed_tags_in_links );
317 317
 
318
-		$module_data['description'] = wp_kses( $module_data['description'], $allowed_tags );
319
-		$module_data['version']     = wp_kses( $module_data['version'],     $allowed_tags );
318
+		$module_data[ 'description' ] = wp_kses( $module_data[ 'description' ], $allowed_tags );
319
+		$module_data[ 'version' ]     = wp_kses( $module_data[ 'version' ], $allowed_tags );
320 320
 
321
-		$module_data['module_uri'] = esc_url( $module_data['module_uri'] );
322
-		$module_data['author_uri'] = esc_url( $module_data['author_uri'] );
321
+		$module_data[ 'module_uri' ] = esc_url( $module_data[ 'module_uri' ] );
322
+		$module_data[ 'author_uri' ] = esc_url( $module_data[ 'author_uri' ] );
323 323
 
324
-		$module_data['title']       = $module_data['name'];
325
-		$module_data['author_name'] = $module_data['author'];
324
+		$module_data[ 'title' ]       = $module_data[ 'name' ];
325
+		$module_data[ 'author_name' ] = $module_data[ 'author' ];
326 326
 
327 327
 		// Apply markup.
328 328
 		if ( $markup ) {
329 329
 
330
-			if ( $module_data['module_uri'] && $module_data['name'] ) {
331
-				$module_data['title'] = '<a href="' . $module_data['module_uri']
332
-					. '">' . $module_data['name'] . '</a>';
330
+			if ( $module_data[ 'module_uri' ] && $module_data[ 'name' ] ) {
331
+				$module_data[ 'title' ] = '<a href="' . $module_data[ 'module_uri' ]
332
+					. '">' . $module_data[ 'name' ] . '</a>';
333 333
 			}
334 334
 
335
-			if ( $module_data['author_uri'] && $module_data['author'] ) {
336
-				$module_data['author'] = '<a href="' . $module_data['author_uri']
337
-					. '">' . $module_data['author'] . '</a>';
335
+			if ( $module_data[ 'author_uri' ] && $module_data[ 'author' ] ) {
336
+				$module_data[ 'author' ] = '<a href="' . $module_data[ 'author_uri' ]
337
+					. '">' . $module_data[ 'author' ] . '</a>';
338 338
 			}
339 339
 
340
-			$module_data['description'] = wptexturize( $module_data['description'] );
340
+			$module_data[ 'description' ] = wptexturize( $module_data[ 'description' ] );
341 341
 
342
-			if ( $module_data['author'] ) {
343
-				$module_data['description'] .= ' <cite>'
342
+			if ( $module_data[ 'author' ] ) {
343
+				$module_data[ 'description' ] .= ' <cite>'
344 344
 					// translators: Author name.
345
-					. sprintf( __( 'By %s.', 'wordpoints' ), $module_data['author'] )
345
+					. sprintf( __( 'By %s.', 'wordpoints' ), $module_data[ 'author' ] )
346 346
 					. '</cite>';
347 347
 			}
348 348
 		}
349 349
 
350 350
 	} else {
351 351
 
352
-		$module_data['title']       = $module_data['name'];
353
-		$module_data['author_name'] = $module_data['author'];
352
+		$module_data[ 'title' ]       = $module_data[ 'name' ];
353
+		$module_data[ 'author_name' ] = $module_data[ 'author' ];
354 354
 
355 355
 	} // End if ( $markup || $translate ) else.
356 356
 
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
 
475 475
 		$module_data = wordpoints_get_module_data( $module_file, $markup, $translate );
476 476
 
477
-		if ( empty( $module_data['name'] ) ) {
477
+		if ( empty( $module_data[ 'name' ] ) ) {
478 478
 			continue;
479 479
 		}
480 480
 
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
  */
574 574
 function _wordpoints_sort_uname_callback( $a, $b ) {
575 575
 
576
-	return strnatcasecmp( $a['name'], $b['name'] );
576
+	return strnatcasecmp( $a[ 'name' ], $b[ 'name' ] );
577 577
 }
578 578
 
579 579
 /**
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
 
692 692
 	} else {
693 693
 
694
-		$current[] = $module;
694
+		$current[ ] = $module;
695 695
 		sort( $current );
696 696
 		update_option( 'wordpoints_active_modules', $current );
697 697
 	}
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
 	$checked = array();
858 858
 
859 859
 	foreach ( $modules as $module ) {
860
-		$checked[] = 'checked[]=' . $module;
860
+		$checked[ ] = 'checked[]=' . $module;
861 861
 	}
862 862
 
863 863
 	ob_start();
@@ -934,7 +934,7 @@  discard block
 block discarded – undo
934 934
 		}
935 935
 
936 936
 		if ( ! $deleted ) {
937
-			$errors[] = $module_file;
937
+			$errors[ ] = $module_file;
938 938
 		}
939 939
 	}
940 940
 
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.