Completed
Push — develop ( 9aa69a...b20875 )
by J.D.
03:27
created
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.
src/classes/installer/db/tables.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
 			$table_name   = str_replace( '`', '``', $table_name );
88 88
 			$table_schema = trim( $table_schema );
89 89
 
90
-			$schema[] = "CREATE TABLE {$prefix}{$table_name} (
90
+			$schema[ ] = "CREATE TABLE {$prefix}{$table_name} (
91 91
 				{$table_schema}
92 92
 			) {$charset_collate}";
93 93
 		}
Please login to merge, or discard this patch.
src/classes/installer/core.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 			// Make sure the version is set properly even if the data is already
39 39
 			// there, in case the plugin is being reactivated and things had been
40 40
 			// corrupted somehow.
41
-			$data['version'] = WORDPOINTS_VERSION;
41
+			$data[ 'version' ] = WORDPOINTS_VERSION;
42 42
 
43 43
 			wordpoints_update_maybe_network_option( 'wordpoints_data', $data );
44 44
 		}
Please login to merge, or discard this patch.
src/classes/installer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
 		$this->installable->set_network_installed();
76 76
 
77
-		if ( ! isset( $this->install_routines['site'] ) ) {
77
+		if ( ! isset( $this->install_routines[ 'site' ] ) ) {
78 78
 			return;
79 79
 		}
80 80
 
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	protected function run_for_network() {
105 105
 
106
-		if ( ! empty( $this->install_routines['network'] ) ) {
107
-			$this->run_routines( $this->install_routines['network'] );
106
+		if ( ! empty( $this->install_routines[ 'network' ] ) ) {
107
+			$this->run_routines( $this->install_routines[ 'network' ] );
108 108
 		}
109 109
 
110 110
 		$this->installable->set_db_version( null, true );
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
 	 */
116 116
 	protected function run_for_site() {
117 117
 
118
-		if ( ! empty( $this->install_routines['site'] ) ) {
119
-			$this->run_routines( $this->install_routines['site'] );
118
+		if ( ! empty( $this->install_routines[ 'site' ] ) ) {
119
+			$this->run_routines( $this->install_routines[ 'site' ] );
120 120
 		}
121 121
 
122 122
 		if ( ! $this->network_wide ) {
@@ -130,8 +130,8 @@  discard block
 block discarded – undo
130 130
 	 */
131 131
 	protected function run_for_single() {
132 132
 
133
-		if ( ! empty( $this->install_routines['single'] ) ) {
134
-			$this->run_routines( $this->install_routines['single'] );
133
+		if ( ! empty( $this->install_routines[ 'single' ] ) ) {
134
+			$this->run_routines( $this->install_routines[ 'single' ] );
135 135
 		}
136 136
 
137 137
 		$this->installable->set_db_version();
Please login to merge, or discard this patch.