Completed
Push — master ( 6935f1...71ff66 )
by J.D.
05:00
created
src/classes/entity/relationship/dynamic.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
 
31 31
 		$parts = wordpoints_parse_dynamic_slug( $dynamic_slug );
32 32
 
33
-		if ( $parts['dynamic'] ) {
33
+		if ( $parts[ 'dynamic' ] ) {
34 34
 
35 35
 			$parsed = $this->parse_slug( $this->related_entity_slug );
36 36
 
37
-			$this->primary_entity_slug = "{$this->primary_entity_slug}\\{$parts['dynamic']}";
38
-			$this->related_entity_slug = "{$parsed['slug']}\\{$parts['dynamic']}";
37
+			$this->primary_entity_slug = "{$this->primary_entity_slug}\\{$parts[ 'dynamic' ]}";
38
+			$this->related_entity_slug = "{$parsed[ 'slug' ]}\\{$parts[ 'dynamic' ]}";
39 39
 
40
-			if ( $parsed['is_array'] ) {
40
+			if ( $parsed[ 'is_array' ] ) {
41 41
 				$this->related_entity_slug .= '{}';
42 42
 			}
43 43
 		}
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
 		$parsed = $this->parse_slug( $this->related_entity_slug );
52 52
 
53
-		$entity = wordpoints_entities()->get( $parsed['slug'] );
53
+		$entity = wordpoints_entities()->get( $parsed[ 'slug' ] );
54 54
 
55 55
 		if ( $entity instanceof WordPoints_Entity ) {
56 56
 			return $entity->get_title();
Please login to merge, or discard this patch.
src/classes/hook/action/post/type/comment.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 	 */
40 40
 	public function __construct( $slug, array $action_args, array $args = array() ) {
41 41
 
42
-		if ( isset( $args['comment_type'] ) ) {
43
-			$this->comment_type = $args['comment_type'];
42
+		if ( isset( $args[ 'comment_type' ] ) ) {
43
+			$this->comment_type = $args[ 'comment_type' ];
44 44
 		}
45 45
 
46 46
 		parent::__construct( $slug, $action_args, $args );
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
 
56 56
 			$parts = wordpoints_parse_dynamic_slug( $this->slug );
57 57
 
58
-			if ( ! $parts['dynamic'] ) {
58
+			if ( ! $parts[ 'dynamic' ] ) {
59 59
 				return false;
60 60
 			}
61 61
 
62 62
 			$arg_slug = str_replace(
63 63
 				'\\post'
64
-				, '\\' . $parts['dynamic']
64
+				, '\\' . $parts[ 'dynamic' ]
65 65
 				, 'comment\\post'
66 66
 			);
67 67
 
Please login to merge, or discard this patch.
src/classes/hook/condition/number/less/than.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 			return false;
46 46
 		}
47 47
 
48
-		return $value < $settings['value'];
48
+		return $value < $settings[ 'value' ];
49 49
 	}
50 50
 }
51 51
 
Please login to merge, or discard this patch.
src/classes/hook/condition/number/greater/than.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 			return false;
47 47
 		}
48 48
 
49
-		return $value > $settings['value'];
49
+		return $value > $settings[ 'value' ];
50 50
 	}
51 51
 }
52 52
 
Please login to merge, or discard this patch.
src/classes/hook/condition/equals.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 			}
63 63
 		}
64 64
 
65
-		return $settings['value'] === $value;
65
+		return $settings[ 'value' ] === $value;
66 66
 	}
67 67
 }
68 68
 
Please login to merge, or discard this patch.
src/includes/modules.php 1 patch
Spacing   +35 added lines, -35 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();
@@ -922,7 +922,7 @@  discard block
 block discarded – undo
922 922
 		$validate = wordpoints_validate_module( $module_file );
923 923
 
924 924
 		if ( is_wp_error( $validate ) ) {
925
-			$errors[] = $module_file;
925
+			$errors[ ] = $module_file;
926 926
 			continue;
927 927
 		}
928 928
 
@@ -941,7 +941,7 @@  discard block
 block discarded – undo
941 941
 		}
942 942
 
943 943
 		if ( ! $deleted ) {
944
-			$errors[] = $module_file;
944
+			$errors[ ] = $module_file;
945 945
 		}
946 946
 	}
947 947
 
Please login to merge, or discard this patch.