Completed
Push — develop ( 8d114d...308b87 )
by Gennady
17:16
created
future/includes/class-gv-request.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
 				}
141 141
 
142 142
 				$entry = Multi_Entry::from_entries( array_filter( $multientry ) );
143
-			}  else {
143
+			} else {
144 144
 				/**
145 145
 				 * A regular one.
146 146
 				 */
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	public static function is_add_oembed_preview() {
47 47
 		/** The preview request is a parse-embed AJAX call without a type set. */
48
-		return ( self::is_ajax() && ! empty( $_POST['action'] ) && $_POST['action'] == 'parse-embed' && ! isset( $_POST['type'] ) );
48
+		return ( self::is_ajax() && ! empty( $_POST[ 'action' ] ) && $_POST[ 'action' ] == 'parse-embed' && ! isset( $_POST[ 'type' ] ) );
49 49
 	}
50 50
 
51 51
 	/**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 * @return boolean
64 64
 	 */
65 65
 	public static function is_rest() {
66
-		return ! empty( $GLOBALS['wp']->query_vars['rest_route'] );
66
+		return ! empty( $GLOBALS[ 'wp' ]->query_vars[ 'rest_route' ] );
67 67
 	}
68 68
 
69 69
 	/**
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 						return false;
126 126
 					}
127 127
 
128
-					if ( ! in_array( $e['form_id'], $valid_forms ) ) {
128
+					if ( ! in_array( $e[ 'form_id' ], $valid_forms ) ) {
129 129
 						return false;
130 130
 					}
131 131
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 				}
142 142
 
143 143
 				$entry = Multi_Entry::from_entries( array_filter( $multientry ) );
144
-			}  else {
144
+			} else {
145 145
 				/**
146 146
 				 * A regular one.
147 147
 				 */
@@ -196,15 +196,15 @@  discard block
 block discarded – undo
196 196
 			$get = $_GET;
197 197
 		}
198 198
 
199
-		unset( $get['mode'] );
199
+		unset( $get[ 'mode' ] );
200 200
 
201 201
 		$get = array_filter( $get, 'gravityview_is_not_empty_string' );
202 202
 
203
-		if( $has_field_key = $this->_has_field_key( $get ) ) {
203
+		if ( $has_field_key = $this->_has_field_key( $get ) ) {
204 204
 			return true;
205 205
 		}
206 206
 
207
-		return isset( $get['gv_search'] ) || isset( $get['gv_start'] ) || isset( $get['gv_end'] ) || isset( $get['gv_by'] ) || isset( $get['gv_id'] );
207
+		return isset( $get[ 'gv_search' ] ) || isset( $get[ 'gv_start' ] ) || isset( $get[ 'gv_end' ] ) || isset( $get[ 'gv_by' ] ) || isset( $get[ 'gv_id' ] );
208 208
 	}
209 209
 
210 210
 	/**
@@ -227,13 +227,13 @@  discard block
 block discarded – undo
227 227
 
228 228
 		$meta = array();
229 229
 		foreach ( $fields as $field ) {
230
-			if( empty( $field->_gf_field_class_name ) ) {
231
-				$meta[] = preg_quote( $field->name );
230
+			if ( empty( $field->_gf_field_class_name ) ) {
231
+				$meta[ ] = preg_quote( $field->name );
232 232
 			}
233 233
 		}
234 234
 
235 235
 		foreach ( $get as $key => $value ) {
236
-			if ( preg_match('/^filter_(([0-9_]+)|'. implode( '|', $meta ) .')$/sm', $key ) ) {
236
+			if ( preg_match( '/^filter_(([0-9_]+)|' . implode( '|', $meta ) . ')$/sm', $key ) ) {
237 237
 				$has_field_key = true;
238 238
 				break;
239 239
 			}
Please login to merge, or discard this patch.
future/includes/class-gv-template-entry-table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	 */
27 27
 	public function the_field( \GV\Field $field ) {
28 28
 		$renderer = new Field_Renderer();
29
-		$source = is_numeric( $field->ID ) ? ( GF_Form::by_id( $field->form_id ) ? : $this->view->form ) : new Internal_Source();
29
+		$source = is_numeric( $field->ID ) ? ( GF_Form::by_id( $field->form_id ) ?: $this->view->form ) : new Internal_Source();
30 30
 
31 31
 		return $renderer->render( $field, $this->view, $source, $this->entry->from_field( $field ), $this->request );
32 32
 	}
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 		foreach ( $fields->all() as $field ) {
64 64
 			$context = Template_Context::from_template( $this, compact( 'field' ) );
65 65
 
66
-			$form = \GV\GF_Form::by_id( $field->form_id ) ? : $this->view->form;
66
+			$form = \GV\GF_Form::by_id( $field->form_id ) ?: $this->view->form;
67 67
 			$entry = $this->entry->from_field( $field );
68 68
 
69 69
 			if ( ! $entry ) {
Please login to merge, or discard this patch.
future/includes/class-gv-template-entry-list.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	 * @return string
27 27
 	 */
28 28
 	public function the_field( \GV\Field $field, $extras = null ) {
29
-		$form = \GV\GF_Form::by_id( $field->form_id ) ? : $this->view->form;
29
+		$form = \GV\GF_Form::by_id( $field->form_id ) ?: $this->view->form;
30 30
 		$entry = $this->entry->from_field( $field );
31 31
 
32 32
 		if ( ! $entry ) {
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 		}
35 35
 
36 36
 		$renderer = new Field_Renderer();
37
-		$source = is_numeric( $field->ID ) ? ( GF_Form::by_id( $field->form_id ) ? : $this->view->form ) : new Internal_Source();
37
+		$source = is_numeric( $field->ID ) ? ( GF_Form::by_id( $field->form_id ) ?: $this->view->form ) : new Internal_Source();
38 38
 		
39 39
 		$value = $renderer->render( $field, $this->view, $source, $entry, $this->request );
40 40
 		
@@ -62,13 +62,13 @@  discard block
 block discarded – undo
62 62
 		$hide_empty = apply_filters( 'gravityview/render/hide-empty-zone', Utils::get( $extras, 'hide_empty', $this->view->settings->get( 'hide_empty', false ) ), $context );
63 63
 
64 64
 		if ( is_numeric( $field->ID ) ) {
65
-			$extras['field'] = $field->as_configuration();
65
+			$extras[ 'field' ] = $field->as_configuration();
66 66
 		}
67 67
 
68
-		$extras['entry'] = $this->entry->as_entry();
69
-		$extras['hide_empty'] = $hide_empty;
70
-		$extras['label'] = $label;
71
-		$extras['value'] = $value;
68
+		$extras[ 'entry' ] = $this->entry->as_entry();
69
+		$extras[ 'hide_empty' ] = $hide_empty;
70
+		$extras[ 'label' ] = $label;
71
+		$extras[ 'value' ] = $value;
72 72
 
73 73
 		return \gravityview_field_output( $extras, $context );
74 74
 	}
Please login to merge, or discard this patch.