Test Failed
Push — develop ( ce70fb...e9f401 )
by J.D.
02:54
created
src/includes/maintenance.php 1 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/functions.php 2 patches
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -88,7 +88,8 @@  discard block
 block discarded – undo
88 88
  */
89 89
 function wordpoints_maintenance_shutdown_print_rand_str() {
90 90
 
91
-	if ( ! isset( $_GET['wordpoints_module_check'] ) ) { // WPCS: CSRF OK.
91
+	if ( ! isset( $_GET['wordpoints_module_check'] ) ) {
92
+// WPCS: CSRF OK.
92 93
 		return;
93 94
 	}
94 95
 
@@ -98,7 +99,8 @@  discard block
 block discarded – undo
98 99
 		$nonce = get_option( 'wordpoints_module_check_nonce' );
99 100
 	}
100 101
 
101
-	if ( ! $nonce || ! hash_equals( $nonce, sanitize_key( $_GET['wordpoints_module_check'] ) ) ) { // WPCS: CSRF OK.
102
+	if ( ! $nonce || ! hash_equals( $nonce, sanitize_key( $_GET['wordpoints_module_check'] ) ) ) {
103
+// WPCS: CSRF OK.
102 104
 		return;
103 105
 	}
104 106
 
@@ -128,7 +130,8 @@  discard block
 block discarded – undo
128 130
  */
129 131
 function wordpoints_maintenance_filter_modules( $modules ) {
130 132
 
131
-	if ( ! isset( $_GET['check_module'], $_GET['wordpoints_module_check'] ) ) { // WPCS: CSRF OK.
133
+	if ( ! isset( $_GET['check_module'], $_GET['wordpoints_module_check'] ) ) {
134
+// WPCS: CSRF OK.
132 135
 		return $modules;
133 136
 	}
134 137
 
@@ -138,7 +141,8 @@  discard block
 block discarded – undo
138 141
 		$nonce = get_option( 'wordpoints_module_check_nonce' );
139 142
 	}
140 143
 
141
-	if ( ! $nonce || ! hash_equals( $nonce, sanitize_key( $_GET['wordpoints_module_check'] ) ) ) { // WPCS: CSRF OK.
144
+	if ( ! $nonce || ! hash_equals( $nonce, sanitize_key( $_GET['wordpoints_module_check'] ) ) ) {
145
+// WPCS: CSRF OK.
142 146
 		return $modules;
143 147
 	}
144 148
 
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 		$request = $_GET; // WPCS: CSRF OK.
340 340
 	}
341 341
 
342
-	if ( ! isset( $request[ $nonce_key ] ) ) {
342
+	if ( ! isset( $request[$nonce_key] ) ) {
343 343
 		return false;
344 344
 	}
345 345
 
@@ -349,18 +349,18 @@  discard block
 block discarded – undo
349 349
 
350 350
 		foreach ( (array) $format_values as $value ) {
351 351
 
352
-			if ( ! isset( $request[ $value ] ) ) {
352
+			if ( ! isset( $request[$value] ) ) {
353 353
 				return false;
354 354
 			}
355 355
 
356
-			$values[] = $request[ $value ];
356
+			$values[] = $request[$value];
357 357
 		}
358 358
 
359 359
 		$action_format = vsprintf( $action_format, $values );
360 360
 	}
361 361
 
362 362
 	$is_valid = wp_verify_nonce(
363
-		sanitize_key( $request[ $nonce_key ] )
363
+		sanitize_key( $request[$nonce_key] )
364 364
 		, strip_tags( $action_format )
365 365
 	);
366 366
 
@@ -395,10 +395,10 @@  discard block
 block discarded – undo
395 395
 
396 396
 	$error_data = $error->error_data;
397 397
 
398
-	if ( isset( $error_data[ $code ]['title'] ) ) {
398
+	if ( isset( $error_data[$code]['title'] ) ) {
399 399
 
400
-		$error_data[ $code ]['title'] = wp_kses(
401
-			$error->error_data[ $code ]['title']
400
+		$error_data[$code]['title'] = wp_kses(
401
+			$error->error_data[$code]['title']
402 402
 			, 'wordpoints_sanitize_wp_error_title'
403 403
 		);
404 404
 
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 	foreach ( $all_errors as $code => $errors ) {
411 411
 
412 412
 		foreach ( $errors as $key => $message ) {
413
-			$all_errors[ $code ][ $key ] = wp_kses(
413
+			$all_errors[$code][$key] = wp_kses(
414 414
 				$message
415 415
 				, 'wordpoints_sanitize_wp_error_message'
416 416
 			);
@@ -998,15 +998,15 @@  discard block
 block discarded – undo
998 998
 		'delete_wordpoints_modules'         => 'delete_wordpoints_extensions',
999 999
 	);
1000 1000
 
1001
-	if ( isset( $deprecated[ $cap ] ) ) {
1001
+	if ( isset( $deprecated[$cap] ) ) {
1002 1002
 
1003 1003
 		_deprecated_argument(
1004 1004
 			'current_user_can'
1005 1005
 			, '2.4.0'
1006
-			, esc_html( "{$cap} is deprecated, use {$deprecated[ $cap ]} instead." )
1006
+			, esc_html( "{$cap} is deprecated, use {$deprecated[$cap]} instead." )
1007 1007
 		);
1008 1008
 
1009
-		$caps[] = $deprecated[ $cap ];
1009
+		$caps[] = $deprecated[$cap];
1010 1010
 	}
1011 1011
 
1012 1012
 	switch ( $cap ) {
@@ -1276,26 +1276,26 @@  discard block
 block discarded – undo
1276 1276
 
1277 1277
 	foreach ( $map as $shortcut => $canonicals ) {
1278 1278
 
1279
-		if ( ! isset( $array[ $shortcut ] ) ) {
1279
+		if ( ! isset( $array[$shortcut] ) ) {
1280 1280
 			continue;
1281 1281
 		}
1282 1282
 
1283 1283
 		foreach ( $canonicals as $canonical ) {
1284 1284
 
1285
-			if ( ! isset( $array[ $canonical ] ) ) {
1285
+			if ( ! isset( $array[$canonical] ) ) {
1286 1286
 
1287
-				$array[ $canonical ] = $array[ $shortcut ];
1287
+				$array[$canonical] = $array[$shortcut];
1288 1288
 
1289 1289
 			} else {
1290 1290
 
1291
-				$array[ $canonical ] = array_merge(
1292
-					$array[ $canonical ]
1293
-					, $array[ $shortcut ]
1291
+				$array[$canonical] = array_merge(
1292
+					$array[$canonical]
1293
+					, $array[$shortcut]
1294 1294
 				);
1295 1295
 			}
1296 1296
 		}
1297 1297
 
1298
-		unset( $array[ $shortcut ] );
1298
+		unset( $array[$shortcut] );
1299 1299
 	}
1300 1300
 
1301 1301
 	return $array;
Please login to merge, or discard this patch.
src/admin/classes/ajax/hooks.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -334,7 +334,8 @@  discard block
 block discarded – undo
334 334
 	 */
335 335
 	protected function get_reaction_store() {
336 336
 
337
-		if ( ! isset( $_POST['reaction_store'] ) ) { // WPCS: CSRF OK.
337
+		if ( ! isset( $_POST['reaction_store'] ) ) {
338
+// WPCS: CSRF OK.
338 339
 			$this->unexpected_error( 'reaction_store' );
339 340
 		}
340 341
 
@@ -361,7 +362,8 @@  discard block
 block discarded – undo
361 362
 	 */
362 363
 	protected function get_reaction() {
363 364
 
364
-		if ( ! isset( $_POST['id'] ) ) { // WPCS: CSRF OK.
365
+		if ( ! isset( $_POST['id'] ) ) {
366
+// WPCS: CSRF OK.
365 367
 			$this->unexpected_error( 'id' );
366 368
 		}
367 369
 
Please login to merge, or discard this patch.
src/admin/screens/modules-load.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,9 +11,11 @@
 block discarded – undo
11 11
 
12 12
 if ( isset( $_POST['clear-recent-list'] ) ) {
13 13
 	$action = 'clear-recent-list';
14
-} elseif ( isset( $_REQUEST['action'] ) && -1 !== (int) $_REQUEST['action'] ) { // WPCS: CSRF OK.
14
+} elseif ( isset( $_REQUEST['action'] ) && -1 !== (int) $_REQUEST['action'] ) {
15
+// WPCS: CSRF OK.
15 16
 	$action = sanitize_key( $_REQUEST['action'] );
16
-} elseif ( isset( $_REQUEST['action2'] ) && -1 !== (int) $_REQUEST['action2'] ) { // WPCS: CSRF OK.
17
+} elseif ( isset( $_REQUEST['action2'] ) && -1 !== (int) $_REQUEST['action2'] ) {
18
+// WPCS: CSRF OK.
17 19
 	$action = sanitize_key( $_REQUEST['action2'] );
18 20
 } else {
19 21
 	$action = '';
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 		if ( ! is_network_admin() ) {
77 77
 
78 78
 			$recent = wordpoints_get_array_option( 'wordpoints_recently_activated_modules' );
79
-			unset( $recent[ $module ] );
79
+			unset( $recent[$module] );
80 80
 			update_option( 'wordpoints_recently_activated_modules', $recent );
81 81
 		}
82 82
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
 			foreach ( $modules as $i => $module ) {
102 102
 				if ( is_wordpoints_module_active_for_network( $module ) ) {
103
-					unset( $modules[ $i ] );
103
+					unset( $modules[$i] );
104 104
 				}
105 105
 			}
106 106
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
 			foreach ( $modules as $i => $module ) {
110 110
 				if ( is_wordpoints_module_active( $module ) || is_network_only_wordpoints_module( $module ) ) {
111
-					unset( $modules[ $i ] );
111
+					unset( $modules[$i] );
112 112
 				}
113 113
 			}
114 114
 		}
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 			$recent = wordpoints_get_array_option( 'wordpoints_recently_activated_modules' );
131 131
 
132 132
 			foreach ( $modules as $module ) {
133
-				unset( $recent[ $module ] );
133
+				unset( $recent[$module] );
134 134
 			}
135 135
 
136 136
 			update_option( 'wordpoints_recently_activated_modules', $recent );
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 			$deactivated = array();
245 245
 
246 246
 			foreach ( $modules as $module ) {
247
-				$deactivated[ $module ] = time();
247
+				$deactivated[$module] = time();
248 248
 			}
249 249
 
250 250
 			update_option( 'wordpoints_recently_activated_modules', $deactivated + wordpoints_get_array_option( 'wordpoints_recently_activated_modules' ) );
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 				true !== wordpoints_validate_module( $module )
279 279
 				|| is_wordpoints_module_active( $module )
280 280
 			) {
281
-				unset( $modules[ $key ] );
281
+				unset( $modules[$key] );
282 282
 			}
283 283
 		}
284 284
 
@@ -316,10 +316,10 @@  discard block
 block discarded – undo
316 316
 
317 317
 						if ( ! empty( $data ) ) {
318 318
 
319
-							$module_info[ $module ] = $data;
320
-							$module_info[ $module ]['is_uninstallable'] = is_uninstallable_wordpoints_module( $module );
319
+							$module_info[$module] = $data;
320
+							$module_info[$module]['is_uninstallable'] = is_uninstallable_wordpoints_module( $module );
321 321
 
322
-							if ( ! $module_info[ $module ]['network'] ) {
322
+							if ( ! $module_info[$module]['network'] ) {
323 323
 								$have_non_network_modules = true;
324 324
 							}
325 325
 						}
@@ -338,10 +338,10 @@  discard block
 block discarded – undo
338 338
 
339 339
 						foreach ( $folder_modules as $module_file => $data ) {
340 340
 
341
-							$module_info[ $module_file ] = $data;
342
-							$module_info[ $module_file ]['is_uninstallable'] = is_uninstallable_wordpoints_module( $module );
341
+							$module_info[$module_file] = $data;
342
+							$module_info[$module_file]['is_uninstallable'] = is_uninstallable_wordpoints_module( $module );
343 343
 
344
-							if ( ! $module_info[ $module_file ]['network'] ) {
344
+							if ( ! $module_info[$module_file]['network'] ) {
345 345
 								$have_non_network_modules = true;
346 346
 							}
347 347
 						}
Please login to merge, or discard this patch.
src/admin/screens/configure-components.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,8 @@
 block discarded – undo
17 17
 // Show messages and errors.
18 18
 //
19 19
 
20
-if ( isset( $_GET['wordpoints_component'], $_GET['_wpnonce'] ) && $wordpoints_components->is_registered( sanitize_key( $_GET['wordpoints_component'] ) ) ) { // WPCS: CSRF OK.
20
+if ( isset( $_GET['wordpoints_component'], $_GET['_wpnonce'] ) && $wordpoints_components->is_registered( sanitize_key( $_GET['wordpoints_component'] ) ) ) {
21
+// WPCS: CSRF OK.
21 22
 
22 23
 	$component = sanitize_key( $_GET['wordpoints_component'] );
23 24
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 		if ( isset( $message ) ) {
44 44
 
45 45
 			wordpoints_show_admin_message(
46
-				esc_html( sprintf( $message, $components[ $component ]['name'] ) )
46
+				esc_html( sprintf( $message, $components[$component]['name'] ) )
47 47
 				, 'success'
48 48
 				, array( 'dismissible' => true )
49 49
 			);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		if ( isset( $error ) ) {
72 72
 
73 73
 			wordpoints_show_admin_error(
74
-				esc_html( sprintf( $error, $components[ $component ]['name'] ) )
74
+				esc_html( sprintf( $error, $components[$component]['name'] ) )
75 75
 				, array( 'dismissible' => true )
76 76
 			);
77 77
 		}
Please login to merge, or discard this patch.
src/components/points/admin/includes/functions.php 2 patches
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -143,7 +143,8 @@  discard block
 block discarded – undo
143 143
  */
144 144
 function wordpoints_points_admin_screen_hooks() {
145 145
 
146
-	if ( isset( $_GET['edithook'] ) || isset( $_POST['savehook'] ) || isset( $_POST['removehook'] ) ) { // WPCS: CSRF OK.
146
+	if ( isset( $_GET['edithook'] ) || isset( $_POST['savehook'] ) || isset( $_POST['removehook'] ) ) {
147
+// WPCS: CSRF OK.
147 148
 
148 149
 		// - We're doing this without AJAX (JS).
149 150
 
@@ -206,7 +207,8 @@  discard block
 block discarded – undo
206 207
  */
207 208
 function wordpoints_no_js_points_hooks_save() {
208 209
 
209
-	if ( ! isset( $_POST['savehook'] ) && ! isset( $_POST['removehook'] ) ) { // WPCS: CSRF OK.
210
+	if ( ! isset( $_POST['savehook'] ) && ! isset( $_POST['removehook'] ) ) {
211
+// WPCS: CSRF OK.
210 212
 		return;
211 213
 	}
212 214
 
@@ -290,9 +292,12 @@  discard block
 block discarded – undo
290 292
 
291 293
 	<?php if ( $has_form ) : ?>
292 294
 		<hr />
293
-	<?php else : ?>
295
+	<?php else {
296
+	: ?>
294 297
 		<br />
295
-	<?php endif; ?>
298
+	<?php endif;
299
+}
300
+?>
296 301
 
297 302
 	<div class="hook-instance-description">
298 303
 		<label for="<?php $hook->the_field_id( '_description' ); ?>"><?php echo esc_html_x( 'Description (optional):', 'points hook', 'wordpoints' ); ?></label>
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -438,17 +438,17 @@
 block discarded – undo
438 438
 
439 439
 		if (
440 440
 			isset(
441
-				$_POST[ "wordpoints_points_set-{$slug}" ]
442
-				, $_POST[ "wordpoints_points-{$slug}" ]
443
-				, $_POST[ "wordpoints_points_old-{$slug}" ]
441
+				$_POST["wordpoints_points_set-{$slug}"]
442
+				, $_POST["wordpoints_points-{$slug}"]
443
+				, $_POST["wordpoints_points_old-{$slug}"]
444 444
 			)
445
-			&& false !== wordpoints_int( $_POST[ "wordpoints_points-{$slug}" ] )
446
-			&& false !== wordpoints_int( $_POST[ "wordpoints_points_old-{$slug}" ] )
445
+			&& false !== wordpoints_int( $_POST["wordpoints_points-{$slug}"] )
446
+			&& false !== wordpoints_int( $_POST["wordpoints_points_old-{$slug}"] )
447 447
 		) {
448 448
 
449 449
 			wordpoints_alter_points(
450 450
 				$user_id
451
-				, (int) $_POST[ "wordpoints_points-{$slug}" ] - (int) $_POST[ "wordpoints_points_old-{$slug}" ]
451
+				, (int) $_POST["wordpoints_points-{$slug}"] - (int) $_POST["wordpoints_points_old-{$slug}"]
452 452
 				, $slug
453 453
 				, 'profile_edit'
454 454
 				, array(
Please login to merge, or discard this patch.
src/components/points/admin/screens/hooks.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,8 @@  discard block
 block discarded – undo
43 43
 		return;
44 44
 	}
45 45
 
46
-	if ( isset( $_GET['message'] ) && isset( $messages[ (int) $_GET['message'] ] ) ) { // WPCS: CSRF OK.
46
+	if ( isset( $_GET['message'] ) && isset( $messages[ (int) $_GET['message'] ] ) ) {
47
+// WPCS: CSRF OK.
47 48
 
48 49
 		wordpoints_show_admin_message(
49 50
 			esc_html( $messages[ (int) $_GET['message'] ] ) // WPCS: CSRF OK.
@@ -51,7 +52,8 @@  discard block
 block discarded – undo
51 52
 			, array( 'dismissible' => true )
52 53
 		);
53 54
 
54
-	} elseif ( isset( $_GET['error'] ) && isset( $errors[ (int) $_GET['error'] ] ) ) { // WPCS: CSRF OK.
55
+	} elseif ( isset( $_GET['error'] ) && isset( $errors[ (int) $_GET['error'] ] ) ) {
56
+// WPCS: CSRF OK.
55 57
 
56 58
 		wordpoints_show_admin_error(
57 59
 			esc_html( $errors[ (int) $_GET['error'] ] ) // WPCS: CSRF OK.
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,18 +43,18 @@
 block discarded – undo
43 43
 		return;
44 44
 	}
45 45
 
46
-	if ( isset( $_GET['message'] ) && isset( $messages[ (int) $_GET['message'] ] ) ) { // WPCS: CSRF OK.
46
+	if ( isset( $_GET['message'] ) && isset( $messages[(int) $_GET['message']] ) ) { // WPCS: CSRF OK.
47 47
 
48 48
 		wordpoints_show_admin_message(
49
-			esc_html( $messages[ (int) $_GET['message'] ] ) // WPCS: CSRF OK.
49
+			esc_html( $messages[(int) $_GET['message']] ) // WPCS: CSRF OK.
50 50
 			, 'success'
51 51
 			, array( 'dismissible' => true )
52 52
 		);
53 53
 
54
-	} elseif ( isset( $_GET['error'] ) && isset( $errors[ (int) $_GET['error'] ] ) ) { // WPCS: CSRF OK.
54
+	} elseif ( isset( $_GET['error'] ) && isset( $errors[(int) $_GET['error']] ) ) { // WPCS: CSRF OK.
55 55
 
56 56
 		wordpoints_show_admin_error(
57
-			esc_html( $errors[ (int) $_GET['error'] ] ) // WPCS: CSRF OK.
57
+			esc_html( $errors[(int) $_GET['error']] ) // WPCS: CSRF OK.
58 58
 			, array( 'dismissible' => true )
59 59
 		);
60 60
 	}
Please login to merge, or discard this patch.
src/components/points/classes/logs/view/table.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -222,7 +222,8 @@
 block discarded – undo
222 222
 
223 223
 		$search_term = '';
224 224
 
225
-		if ( isset( $_POST['wordpoints_points_logs_search'] ) ) { // WPCS: CSRF OK
225
+		if ( isset( $_POST['wordpoints_points_logs_search'] ) ) {
226
+// WPCS: CSRF OK
226 227
 			$search_term = trim(
227 228
 				sanitize_text_field(
228 229
 					wp_unslash( $_POST['wordpoints_points_logs_search'] ) // WPCS: CSRF OK
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 		$extra_classes = array();
87 87
 
88 88
 		foreach ( array( 'searchable', 'paginate' ) as $arg ) {
89
-			if ( $this->args[ $arg ] ) {
89
+			if ( $this->args[$arg] ) {
90 90
 				$extra_classes[] = $arg;
91 91
 			}
92 92
 		}
Please login to merge, or discard this patch.
src/components/points/admin/classes/screen/points/types.php 2 patches
Braces   +17 added lines, -8 removed lines patch added patch discarded remove patch
@@ -245,8 +245,11 @@  discard block
 block discarded – undo
245 245
 					<p>
246 246
 						<?php if ( $slug ) : ?>
247 247
 							<?php esc_html_e( 'Changes to this points type&#8217;s settings will affect all sites on this network.', 'wordpoints' ); ?>
248
-						<?php else : ?>
249
-							<?php esc_html_e( 'The new points type will be global across all sites on this network.', 'wordpoints' ); ?>
248
+						<?php else {
249
+	: ?>
250
+							<?php esc_html_e( 'The new points type will be global across all sites on this network.', 'wordpoints' );
251
+}
252
+?>
250 253
 						<?php endif; ?>
251 254
 					</p>
252 255
 				</div>
@@ -655,15 +658,18 @@  discard block
 block discarded – undo
655 658
 			return;
656 659
 		}
657 660
 
658
-		if ( isset( $_POST['save-points-type'] ) ) { // WPCS: CSRF OK
661
+		if ( isset( $_POST['save-points-type'] ) ) {
662
+// WPCS: CSRF OK
659 663
 
660
-			if ( ! empty( $_POST['add_new'] ) ) { // WPCS: CSRF OK
664
+			if ( ! empty( $_POST['add_new'] ) ) {
665
+// WPCS: CSRF OK
661 666
 				$this->add_points_type();
662 667
 			} else {
663 668
 				$this->update_points_type();
664 669
 			}
665 670
 
666
-		} elseif ( ! empty( $_POST['delete-points-type'] ) ) { // WPCS: CSRF OK
671
+		} elseif ( ! empty( $_POST['delete-points-type'] ) ) {
672
+// WPCS: CSRF OK
667 673
 
668 674
 			$this->delete_points_type();
669 675
 		}
@@ -680,19 +686,22 @@  discard block
 block discarded – undo
680 686
 
681 687
 		$settings = array();
682 688
 
683
-		if ( isset( $_POST['points-name'] ) ) { // WPCS: CSRF OK
689
+		if ( isset( $_POST['points-name'] ) ) {
690
+// WPCS: CSRF OK
684 691
 			$settings['name'] = trim(
685 692
 				sanitize_text_field( wp_unslash( $_POST['points-name'] ) ) // WPCS: CSRF OK
686 693
 			);
687 694
 		}
688 695
 
689
-		if ( isset( $_POST['points-prefix'] ) ) { // WPCS: CSRF OK
696
+		if ( isset( $_POST['points-prefix'] ) ) {
697
+// WPCS: CSRF OK
690 698
 			$settings['prefix'] = ltrim(
691 699
 				sanitize_text_field( wp_unslash( $_POST['points-prefix'] ) ) // WPCS: CSRF OK
692 700
 			);
693 701
 		}
694 702
 
695
-		if ( isset( $_POST['points-suffix'] ) ) { // WPCS: CSRF OK
703
+		if ( isset( $_POST['points-suffix'] ) ) {
704
+// WPCS: CSRF OK
696 705
 			$settings['suffix'] = rtrim(
697 706
 				sanitize_text_field( wp_unslash( $_POST['points-suffix'] ) ) // WPCS: CSRF OK
698 707
 			);
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
 
515 515
 			if (
516 516
 				! array_intersect_key(
517
-					$event_action_types[ $slug ]
517
+					$event_action_types[$slug]
518 518
 					, $reactor_action_types
519 519
 				)
520 520
 			) {
@@ -567,13 +567,13 @@  discard block
 block discarded – undo
567 567
 
568 568
 		foreach ( $this->event_args->get_children( $event_slug ) as $slug => $arg ) {
569 569
 
570
-			$event_data['args'][ $slug ] = array(
570
+			$event_data['args'][$slug] = array(
571 571
 				'slug' => $slug,
572 572
 			);
573 573
 
574 574
 			if ( $arg instanceof WordPoints_Hook_ArgI ) {
575
-				$event_data['args'][ $slug ]['title']       = $arg->get_title();
576
-				$event_data['args'][ $slug ]['is_stateful'] = $arg->is_stateful();
575
+				$event_data['args'][$slug]['title']       = $arg->get_title();
576
+				$event_data['args'][$slug]['is_stateful'] = $arg->is_stateful();
577 577
 			}
578 578
 		}
579 579
 
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
 		$tabs = array();
629 629
 
630 630
 		foreach ( $points_types as $slug => $settings ) {
631
-			$tabs[ $slug ] = $settings['name'];
631
+			$tabs[$slug] = $settings['name'];
632 632
 		}
633 633
 
634 634
 		$tabs['add-new'] = __( 'Add New', 'wordpoints' );
Please login to merge, or discard this patch.