Completed
Push — develop ( 08a1ab...5dbd9d )
by Zack
07:41
created
future/includes/class-gv-request.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 */
70 70
 	public static function is_add_oembed_preview() {
71 71
 		/** The preview request is a parse-embed AJAX call without a type set. */
72
-		return ( self::is_ajax() && ! empty( $_POST['action'] ) && $_POST['action'] == 'parse-embed' && ! isset( $_POST['type'] ) );
72
+		return ( self::is_ajax() && ! empty( $_POST[ 'action' ] ) && $_POST[ 'action' ] == 'parse-embed' && ! isset( $_POST[ 'type' ] ) );
73 73
 	}
74 74
 
75 75
 	/**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 * @return boolean
88 88
 	 */
89 89
 	public static function is_rest() {
90
-		return ! empty( $GLOBALS['wp']->query_vars['rest_route'] );
90
+		return ! empty( $GLOBALS[ 'wp' ]->query_vars[ 'rest_route' ] );
91 91
 	}
92 92
 
93 93
 	/**
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 					return false;
158 158
 				}
159 159
 
160
-				if ( ! in_array( $e['form_id'], $valid_forms ) ) {
160
+				if ( ! in_array( $e[ 'form_id' ], $valid_forms ) ) {
161 161
 					return false;
162 162
 				}
163 163
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 			}
174 174
 
175 175
 			$entry = Multi_Entry::from_entries( array_filter( $multientry ) );
176
-		}  else {
176
+		} else {
177 177
 			/**
178 178
 			 * A regular one.
179 179
 			 */
@@ -231,15 +231,15 @@  discard block
 block discarded – undo
231 231
 			$get = $_GET;
232 232
 		}
233 233
 
234
-		unset( $get['mode'] );
234
+		unset( $get[ 'mode' ] );
235 235
 
236 236
 		$get = array_filter( $get, 'gravityview_is_not_empty_string' );
237 237
 
238
-		if( $has_field_key = $this->_has_field_key( $get ) ) {
238
+		if ( $has_field_key = $this->_has_field_key( $get ) ) {
239 239
 			return true;
240 240
 		}
241 241
 
242
-		return isset( $get['gv_search'] ) || isset( $get['gv_start'] ) || isset( $get['gv_end'] ) || isset( $get['gv_by'] ) || isset( $get['gv_id'] );
242
+		return isset( $get[ 'gv_search' ] ) || isset( $get[ 'gv_start' ] ) || isset( $get[ 'gv_end' ] ) || isset( $get[ 'gv_by' ] ) || isset( $get[ 'gv_id' ] );
243 243
 	}
244 244
 
245 245
 	/**
@@ -262,13 +262,13 @@  discard block
 block discarded – undo
262 262
 
263 263
 		$meta = array();
264 264
 		foreach ( $fields as $field ) {
265
-			if( empty( $field->_gf_field_class_name ) ) {
266
-				$meta[] = preg_quote( $field->name );
265
+			if ( empty( $field->_gf_field_class_name ) ) {
266
+				$meta[ ] = preg_quote( $field->name );
267 267
 			}
268 268
 		}
269 269
 
270 270
 		foreach ( $get as $key => $value ) {
271
-			if ( preg_match('/^filter_(([0-9_]+)|'. implode( '|', $meta ) .')$/sm', $key ) ) {
271
+			if ( preg_match( '/^filter_(([0-9_]+)|' . implode( '|', $meta ) . ')$/sm', $key ) ) {
272 272
 				$has_field_key = true;
273 273
 				break;
274 274
 			}
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@
 block discarded – undo
173 173
 			}
174 174
 
175 175
 			$entry = Multi_Entry::from_entries( array_filter( $multientry ) );
176
-		}  else {
176
+		} else {
177 177
 			/**
178 178
 			 * A regular one.
179 179
 			 */
Please login to merge, or discard this patch.