Completed
Push — master ( 9bbfca...6621c7 )
by J.D.
03:38
created
src/classes/entity/contexts.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
 			}
93 93
 		}
94 94
 
95
-		$this->switched[] = $switched;
95
+		$this->switched[ ] = $switched;
96 96
 
97 97
 		return true;
98 98
 	}
Please login to merge, or discard this patch.
src/classes/entity/restrictions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 		$depth = count( $hierarchy );
52 52
 
53 53
 		if ( 1 === $depth ) {
54
-			$class_hierarchies[] = array();
54
+			$class_hierarchies[ ] = array();
55 55
 		}
56 56
 
57 57
 		if ( is_array( $entity_id ) ) {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 		// If a user isn't allowed to even know about an entity, they can't do
73 73
 		// anything else either. So we always check that too.
74 74
 		if ( 'know' !== $type ) {
75
-			$types[] = 'know';
75
+			$types[ ] = 'know';
76 76
 		}
77 77
 
78 78
 		foreach ( $types as $type ) {
Please login to merge, or discard this patch.
src/classes/entity/array.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,8 +94,8 @@
 block discarded – undo
94 94
 			$entity = clone $this->entity_object;
95 95
 
96 96
 			if ( $entity->set_the_value( $value ) ) {
97
-				$this->the_entities[] = $entity;
98
-				$this->the_value[] = $entity->get_the_id();
97
+				$this->the_entities[ ] = $entity;
98
+				$this->the_value[ ] = $entity->get_the_id();
99 99
 			}
100 100
 		}
101 101
 
Please login to merge, or discard this patch.
src/classes/entity/user/roles.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 			'type' => 'db',
54 54
 			'info' => array(
55 55
 				'type'             => 'table',
56
-				'table_name'       => $GLOBALS['wpdb']->usermeta,
56
+				'table_name'       => $GLOBALS[ 'wpdb' ]->usermeta,
57 57
 				'primary_id_field' => 'user_id',
58 58
 				'related_id_field' => array(
59 59
 					'type'  => 'serialized_array',
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 				'conditions'       => array(
63 63
 					array(
64 64
 						'field' => 'meta_key',
65
-						'value' => $GLOBALS['wpdb']->get_blog_prefix() . 'capabilities',
65
+						'value' => $GLOBALS[ 'wpdb' ]->get_blog_prefix() . 'capabilities',
66 66
 					),
67 67
 				),
68 68
 			),
Please login to merge, or discard this patch.
src/classes/entity/attr/stored/db/table/meta.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
 			'type' => 'db',
130 130
 			'info' => array(
131 131
 				'type'             => 'meta_table',
132
-				'table_name'       => $GLOBALS['wpdb']->{$this->wpdb_table_name},
132
+				'table_name'       => $GLOBALS[ 'wpdb' ]->{$this->wpdb_table_name},
133 133
 				'meta_key'         => $this->meta_key,
134 134
 				'meta_key_field'   => $this->meta_key_field,
135 135
 				'meta_value_field' => $this->meta_value_field,
Please login to merge, or discard this patch.
src/classes/entity/restriction/wrapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 
65 65
 		foreach ( $restrictions as $restriction ) {
66 66
 			if ( $restriction->applies() ) {
67
-				$this->restrictions[] = $restriction;
67
+				$this->restrictions[ ] = $restriction;
68 68
 			}
69 69
 		}
70 70
 	}
Please login to merge, or discard this patch.
src/classes/entity/restriction/unregistered.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 	 * @since 2.2.0
32 32
 	 */
33 33
 	public function __construct( $entity_id, array $hierarchy ) {
34
-		$this->is_registered = wordpoints_entities()->is_registered( $hierarchy[0] );
34
+		$this->is_registered = wordpoints_entities()->is_registered( $hierarchy[ 0 ] );
35 35
 	}
36 36
 
37 37
 	/**
Please login to merge, or discard this patch.
src/classes/modules.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -147,8 +147,8 @@  discard block
 block discarded – undo
147 147
 
148 148
 		self::$registered[ $slug ] = self::parse_headers( $data );
149 149
 
150
-		self::$registered[ $slug ]['raw'] = $data;
151
-		self::$registered[ $slug ]['raw_file'] = wp_normalize_path( $file );
150
+		self::$registered[ $slug ][ 'raw' ] = $data;
151
+		self::$registered[ $slug ][ 'raw_file' ] = wp_normalize_path( $file );
152 152
 
153 153
 		self::register_installable( $slug, $file );
154 154
 		self::maybe_load_textdomain( $slug, $file );
@@ -181,13 +181,13 @@  discard block
 block discarded – undo
181 181
 
182 182
 			$parts = explode( ':', $line, 2 );
183 183
 
184
-			$data_slug = trim( $parts[0] );
184
+			$data_slug = trim( $parts[ 0 ] );
185 185
 
186
-			if ( isset( self::$default_headers[ $parts[0] ] ) ) {
187
-				$data_slug = self::$default_headers[ $parts[0] ];
186
+			if ( isset( self::$default_headers[ $parts[ 0 ] ] ) ) {
187
+				$data_slug = self::$default_headers[ $parts[ 0 ] ];
188 188
 			}
189 189
 
190
-			$parsed[ $data_slug ] = trim( $parts[1] );
190
+			$parsed[ $data_slug ] = trim( $parts[ 1 ] );
191 191
 		}
192 192
 
193 193
 		return $parsed + array_fill_keys( self::$default_headers, '' );
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 			'module'
208 208
 			, $slug
209 209
 			, array(
210
-				'version'      => self::$registered[ $slug ]['version'],
210
+				'version'      => self::$registered[ $slug ][ 'version' ],
211 211
 				'un_installer' => dirname( $file ) . '/includes/class-un-installer.php',
212 212
 				'network_wide' => is_wordpoints_module_active_for_network( $file ),
213 213
 			)
@@ -224,18 +224,18 @@  discard block
 block discarded – undo
224 224
 	 */
225 225
 	private static function maybe_load_textdomain( $slug, $file ) {
226 226
 
227
-		if ( empty( self::$registered[ $slug ]['text_domain'] ) ) {
227
+		if ( empty( self::$registered[ $slug ][ 'text_domain' ] ) ) {
228 228
 			return;
229 229
 		}
230 230
 
231 231
 		$path = false;
232 232
 
233
-		if ( ! empty( self::$registered[ $slug ]['domain_path'] ) ) {
234
-			$path = wordpoints_module_basename( $file ) . self::$registered[ $slug ]['domain_path'];
233
+		if ( ! empty( self::$registered[ $slug ][ 'domain_path' ] ) ) {
234
+			$path = wordpoints_module_basename( $file ) . self::$registered[ $slug ][ 'domain_path' ];
235 235
 		}
236 236
 
237 237
 		wordpoints_load_module_textdomain(
238
-			self::$registered[ $slug ]['text_domain']
238
+			self::$registered[ $slug ][ 'text_domain' ]
239 239
 			, $path
240 240
 		);
241 241
 	}
Please login to merge, or discard this patch.
src/classes/components.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -135,11 +135,11 @@  discard block
 block discarded – undo
135 135
 
136 136
 		foreach ( $this->get() as $component ) {
137 137
 
138
-			if ( ! $this->is_active( $component['slug'] ) ) {
138
+			if ( ! $this->is_active( $component[ 'slug' ] ) ) {
139 139
 				continue;
140 140
 			}
141 141
 
142
-			include_once( $component['file'] );
142
+			include_once( $component[ 'file' ] );
143 143
 		}
144 144
 
145 145
 		/**
@@ -261,22 +261,22 @@  discard block
 block discarded – undo
261 261
 		$component = array_merge( $defaults, $args );
262 262
 
263 263
 		if (
264
-			empty( $component['name'] )
265
-			|| empty( $component['file'] )
266
-			|| empty( $component['slug'] )
267
-			|| $this->is_registered( $component['slug'] )
264
+			empty( $component[ 'name' ] )
265
+			|| empty( $component[ 'file' ] )
266
+			|| empty( $component[ 'slug' ] )
267
+			|| $this->is_registered( $component[ 'slug' ] )
268 268
 		) {
269 269
 			return false;
270 270
 		}
271 271
 
272
-		$this->registered[ $component['slug'] ] = array_intersect_key( $component, $defaults );
272
+		$this->registered[ $component[ 'slug' ] ] = array_intersect_key( $component, $defaults );
273 273
 
274 274
 		WordPoints_Installables::register(
275 275
 			'component'
276
-			, $component['slug']
276
+			, $component[ 'slug' ]
277 277
 			, array(
278
-				'version'      => $this->registered[ $component['slug'] ]['version'],
279
-				'un_installer' => $this->registered[ $component['slug'] ]['un_installer'],
278
+				'version'      => $this->registered[ $component[ 'slug' ] ][ 'version' ],
279
+				'un_installer' => $this->registered[ $component[ 'slug' ] ][ 'un_installer' ],
280 280
 				'network_wide' => is_wordpoints_network_active(),
281 281
 			)
282 282
 		);
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 				return false;
343 343
 			}
344 344
 
345
-			include_once( $this->registered[ $slug ]['file'] );
345
+			include_once( $this->registered[ $slug ][ 'file' ] );
346 346
 
347 347
 			WordPoints_Installables::get_installer( 'component', $slug )->install(
348 348
 				is_wordpoints_network_active()
Please login to merge, or discard this patch.