Completed
Branch develop (9aa69a)
by J.D.
03:55
created
src/classes/entity/attr/stored/db/table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 			'type' => 'db',
53 53
 			'info' => array(
54 54
 				'type'            => 'table',
55
-				'table_name'      => $GLOBALS['wpdb']->{$this->wpdb_table_name},
55
+				'table_name'      => $GLOBALS[ 'wpdb' ]->{$this->wpdb_table_name},
56 56
 				'attr_field'      => $this->attr_field,
57 57
 				'entity_id_field' => $this->entity_id_field,
58 58
 			),
Please login to merge, or discard this patch.
src/classes/entity/comment.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,11 +89,11 @@
 block discarded – undo
89 89
 			'type' => 'db',
90 90
 			'info' => array(
91 91
 				'type'       => 'table',
92
-				'table_name' => $GLOBALS['wpdb']->{$this->wpdb_table_name},
92
+				'table_name' => $GLOBALS[ 'wpdb' ]->{$this->wpdb_table_name},
93 93
 				'conditions' => array(
94 94
 					array(
95 95
 						'field' => array(
96
-							'table_name' => $GLOBALS['wpdb']->posts,
96
+							'table_name' => $GLOBALS[ 'wpdb' ]->posts,
97 97
 							'on'         => array(
98 98
 								'primary_field'   => 'comment_post_ID',
99 99
 								'join_field'      => 'ID',
Please login to merge, or discard this patch.
src/classes/entity/term/parent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 			'type' => 'db',
61 61
 			'info' => array(
62 62
 				'type'             => 'table',
63
-				'table_name'       => $GLOBALS['wpdb']->term_taxonomy,
63
+				'table_name'       => $GLOBALS[ 'wpdb' ]->term_taxonomy,
64 64
 				'primary_id_field' => 'term_id',
65 65
 				'related_id_field' => 'parent',
66 66
 			),
Please login to merge, or discard this patch.
src/classes/entity/relationship/dynamic.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
 		$parts = wordpoints_parse_dynamic_slug( $this->slug );
25 25
 
26
-		if ( ! $parts['dynamic'] ) {
26
+		if ( ! $parts[ 'dynamic' ] ) {
27 27
 			// Back-compat for pre-2.3.0, just in case of manual construction without
28 28
 			// the parent slug.
29 29
 			if ( isset( $parent_slug ) ) {
@@ -31,18 +31,18 @@  discard block
 block discarded – undo
31 31
 			}
32 32
 		}
33 33
 
34
-		if ( $parts['dynamic'] ) {
34
+		if ( $parts[ 'dynamic' ] ) {
35 35
 
36 36
 			// Back compat for pre-2.4.0, in case of manual construction.
37 37
 			if ( ! isset( $parent_slug ) ) {
38
-				$this->primary_entity_slug = "{$this->primary_entity_slug}\\{$parts['dynamic']}";
38
+				$this->primary_entity_slug = "{$this->primary_entity_slug}\\{$parts[ 'dynamic' ]}";
39 39
 			}
40 40
 
41 41
 			$parsed = $this->parse_slug( $this->related_entity_slug );
42 42
 
43
-			$this->related_entity_slug = "{$parsed['slug']}\\{$parts['dynamic']}";
43
+			$this->related_entity_slug = "{$parsed[ 'slug' ]}\\{$parts[ 'dynamic' ]}";
44 44
 
45
-			if ( $parsed['is_array'] ) {
45
+			if ( $parsed[ 'is_array' ] ) {
46 46
 				$this->related_entity_slug .= '{}';
47 47
 			}
48 48
 		}
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
 		$parsed = $this->parse_slug( $this->related_entity_slug );
57 57
 
58
-		$entity = wordpoints_entities()->get( $parsed['slug'] );
58
+		$entity = wordpoints_entities()->get( $parsed[ 'slug' ] );
59 59
 
60 60
 		if ( $entity instanceof WordPoints_Entity ) {
61 61
 			return $entity->get_title();
Please login to merge, or discard this patch.
src/classes/entity/term.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,11 +82,11 @@
 block discarded – undo
82 82
 			'type' => 'db',
83 83
 			'info' => array(
84 84
 				'type'       => 'table',
85
-				'table_name' => $GLOBALS['wpdb']->{$this->wpdb_table_name},
85
+				'table_name' => $GLOBALS[ 'wpdb' ]->{$this->wpdb_table_name},
86 86
 				'conditions' => array(
87 87
 					array(
88 88
 						'field' => array(
89
-							'table_name' => $GLOBALS['wpdb']->term_taxonomy,
89
+							'table_name' => $GLOBALS[ 'wpdb' ]->term_taxonomy,
90 90
 							'on'         => array(
91 91
 								'primary_field'   => 'term_id',
92 92
 								'join_field'      => 'term_id',
Please login to merge, or discard this patch.
src/classes/entity/relationship.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	protected function get_related_guids_from_ids( $related_ids ) {
151 151
 
152 152
 		$parsed_slug = $this->parse_slug( $this->get_related_entity_slug() );
153
-		$slug        = $parsed_slug['slug'];
153
+		$slug        = $parsed_slug[ 'slug' ];
154 154
 
155 155
 		/** @var WordPoints_Entity $related_entity */
156 156
 		$related_entity = wordpoints_entities()->get( $slug );
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 			$related_guids = array();
169 169
 
170 170
 			foreach ( $related_ids as $id ) {
171
-				$related_guids[] = array( $slug => $id ) + $context;
171
+				$related_guids[ ] = array( $slug => $id ) + $context;
172 172
 			}
173 173
 
174 174
 		} else {
@@ -255,10 +255,10 @@  discard block
 block discarded – undo
255 255
 
256 256
 		$parsed_slug = $this->parse_slug( $child_slug );
257 257
 
258
-		if ( $parsed_slug['is_array'] ) {
259
-			$child = new WordPoints_Entity_Array( $parsed_slug['slug'] );
258
+		if ( $parsed_slug[ 'is_array' ] ) {
259
+			$child = new WordPoints_Entity_Array( $parsed_slug[ 'slug' ] );
260 260
 		} else {
261
-			$child = wordpoints_entities()->get( $parsed_slug['slug'] );
261
+			$child = wordpoints_entities()->get( $parsed_slug[ 'slug' ] );
262 262
 		}
263 263
 
264 264
 		if ( isset( $this->the_value ) ) {
Please login to merge, or discard this patch.
src/classes/entity/post.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 			'type' => 'db',
85 85
 			'info' => array(
86 86
 				'type'       => 'table',
87
-				'table_name' => $GLOBALS['wpdb']->{$this->wpdb_table_name},
87
+				'table_name' => $GLOBALS[ 'wpdb' ]->{$this->wpdb_table_name},
88 88
 				'conditions' => array(
89 89
 					array(
90 90
 						'field' => 'post_type',
Please login to merge, or discard this patch.
src/classes/entity/post/terms.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,10 +55,10 @@
 block discarded – undo
55 55
 			'type' => 'db',
56 56
 			'info' => array(
57 57
 				'type'             => 'table',
58
-				'table_name'       => $GLOBALS['wpdb']->term_relationships,
58
+				'table_name'       => $GLOBALS[ 'wpdb' ]->term_relationships,
59 59
 				'primary_id_field' => 'object_id',
60 60
 				'related_id_field' => array(
61
-					'table_name' => $GLOBALS['wpdb']->term_taxonomy,
61
+					'table_name' => $GLOBALS[ 'wpdb' ]->term_taxonomy,
62 62
 					'on'         => array(
63 63
 						'primary_field' => 'term_taxonomy_id',
64 64
 						'join_field'    => 'term_taxonomy_id',
Please login to merge, or discard this patch.
src/classes/entity/hierarchy.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
 		unset( $this->entities[ $slug ] );
78 78
 
79 79
 		if (
80
-			isset( $this->hierarchy[0] )
81
-			&& $this->hierarchy[0]->get_slug() === $slug
80
+			isset( $this->hierarchy[ 0 ] )
81
+			&& $this->hierarchy[ 0 ]->get_slug() === $slug
82 82
 		) {
83 83
 			$this->current   = null;
84 84
 			$this->hierarchy = array();
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 		}
113 113
 
114 114
 		if ( $this->current ) {
115
-			$this->hierarchy[] = $this->current;
115
+			$this->hierarchy[ ] = $this->current;
116 116
 		}
117 117
 
118 118
 		$this->current = $child;
Please login to merge, or discard this patch.