Completed
Push — master ( 9bbfca...6621c7 )
by J.D.
03:38
created
src/includes/apps.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
 
70 70
 	$parts = explode( '\\', $slug, 2 );
71 71
 
72
-	if ( isset( $parts[1] ) ) {
73
-		$parsed['dynamic'] = $parts[1];
74
-		$parsed['generic'] = $parts[0];
72
+	if ( isset( $parts[ 1 ] ) ) {
73
+		$parsed[ 'dynamic' ] = $parts[ 1 ];
74
+		$parsed[ 'generic' ] = $parts[ 0 ];
75 75
 	}
76 76
 
77 77
 	return $parsed;
@@ -347,19 +347,19 @@  discard block
 block discarded – undo
347 347
 
348 348
 	$supports = get_all_post_type_supports( $slug );
349 349
 
350
-	if ( isset( $supports['title'] ) ) {
350
+	if ( isset( $supports[ 'title' ] ) ) {
351 351
 		$children->register( "post\\{$slug}", 'title', 'WordPoints_Entity_Post_Title' );
352 352
 	}
353 353
 
354
-	if ( isset( $supports['editor'] ) ) {
354
+	if ( isset( $supports[ 'editor' ] ) ) {
355 355
 		$children->register( "post\\{$slug}", 'content', 'WordPoints_Entity_Post_Content' );
356 356
 	}
357 357
 
358
-	if ( isset( $supports['excerpt'] ) ) {
358
+	if ( isset( $supports[ 'excerpt' ] ) ) {
359 359
 		$children->register( "post\\{$slug}", 'excerpt', 'WordPoints_Entity_Post_Excerpt' );
360 360
 	}
361 361
 
362
-	if ( isset( $supports['comments'] ) ) {
362
+	if ( isset( $supports[ 'comments' ] ) ) {
363 363
 
364 364
 		$children->register( "post\\{$slug}", 'comment_count', 'WordPoints_Entity_Post_Comment_Count' );
365 365
 
@@ -486,10 +486,10 @@  discard block
 block discarded – undo
486 486
 	if (
487 487
 		defined( 'DOING_AJAX' )
488 488
 		&& DOING_AJAX
489
-		&& isset( $_SERVER['HTTP_REFERER'] )
489
+		&& isset( $_SERVER[ 'HTTP_REFERER' ] )
490 490
 		&& preg_match(
491 491
 			'#^' . preg_quote( network_admin_url(), '#' ) . '#i'
492
-			, esc_url_raw( wp_unslash( $_SERVER['HTTP_REFERER'] ) )
492
+			, esc_url_raw( wp_unslash( $_SERVER[ 'HTTP_REFERER' ] ) )
493 493
 		)
494 494
 	) {
495 495
 		return true;
Please login to merge, or discard this patch.
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.