Completed
Push — develop ( 64c41d...4bb36d )
by Zack
20:30
created
future/includes/class-gv-widget.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 		$enable_custom_class = apply_filters( 'gravityview/widget/enable_custom_class', false, $this );
152 152
 
153 153
 		if ( $enable_custom_class ) {
154
-			$settings['custom_class'] = array(
154
+			$settings[ 'custom_class' ] = array(
155 155
 				'type' => 'text',
156 156
 				'label' => __( 'Custom CSS Class:', 'gravityview' ),
157 157
 				'desc' => __( 'This class will be added to the widget container', 'gravityview' ),
@@ -203,8 +203,8 @@  discard block
 block discarded – undo
203 203
 	 */
204 204
 	public static function get_default_widget_areas() {
205 205
 		$default_areas = array(
206
-			array( '1-1' => array( array( 'areaid' => 'top', 'title' => __( 'Top', 'gravityview' ) , 'subtitle' => '' ) ) ),
207
-			array( '1-2' => array( array( 'areaid' => 'left', 'title' => __( 'Left', 'gravityview' ) , 'subtitle' => '' ) ), '2-2' => array( array( 'areaid' => 'right', 'title' => __( 'Right', 'gravityview' ) , 'subtitle' => '' ) ) ),
206
+			array( '1-1' => array( array( 'areaid' => 'top', 'title' => __( 'Top', 'gravityview' ), 'subtitle' => '' ) ) ),
207
+			array( '1-2' => array( array( 'areaid' => 'left', 'title' => __( 'Left', 'gravityview' ), 'subtitle' => '' ) ), '2-2' => array( array( 'areaid' => 'right', 'title' => __( 'Right', 'gravityview' ), 'subtitle' => '' ) ) ),
208 208
 		);
209 209
 
210 210
 		/**
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 		}
235 235
 
236 236
 		$widgets[ $this->get_widget_id() ] = array(
237
-			'label' => $this->widget_label ,
237
+			'label' => $this->widget_label,
238 238
 			'description' => $this->widget_description,
239 239
 			'subtitle' => $this->widget_subtitle,
240 240
 			'class' => get_called_class(),
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 	 */
256 256
 	public function assign_widget_options( $options = array(), $template = '', $widget = '' ) {
257 257
 		if ( $this->get_widget_id() === $widget ) {
258
-			if( $settings = $this->get_settings() ) {
258
+			if ( $settings = $this->get_settings() ) {
259 259
 				$options = array_merge( $options, $settings );
260 260
 			}
261 261
 		}
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 			return;
307 307
 		}
308 308
 
309
-		add_shortcode( $this->shortcode_name, array( $this, 'render_shortcode') );
309
+		add_shortcode( $this->shortcode_name, array( $this, 'render_shortcode' ) );
310 310
 	}
311 311
 
312 312
 	/**
Please login to merge, or discard this patch.
future/includes/class-gv-extension.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -180,13 +180,13 @@  discard block
 block discarded – undo
180 180
 		$tab = wp_parse_args( $tab_settings, $tab_defaults );
181 181
 
182 182
 		// Force the screen to be GravityView
183
-		$tab['screen'] = 'gravityview';
183
+		$tab[ 'screen' ] = 'gravityview';
184 184
 
185 185
 		if ( class_exists( 'GravityView_Metabox_Tab' ) ) {
186
-			$metabox = new \GravityView_Metabox_Tab( $tab['id'], $tab['title'], $tab['file'], $tab['icon-class'], $tab['callback'], $tab['callback_args'] );
186
+			$metabox = new \GravityView_Metabox_Tab( $tab[ 'id' ], $tab[ 'title' ], $tab[ 'file' ], $tab[ 'icon-class' ], $tab[ 'callback' ], $tab[ 'callback_args' ] );
187 187
 			\GravityView_Metabox_Tabs::add( $metabox );
188 188
 		} else {
189
-			add_meta_box( 'gravityview_' . $tab['id'], $tab['title'], $tab['callback'], $tab['screen'], $tab['context'], $tab['priority'] );
189
+			add_meta_box( 'gravityview_' . $tab[ 'id' ], $tab[ 'title' ], $tab[ 'callback' ], $tab[ 'screen' ], $tab[ 'context' ], $tab[ 'priority' ] );
190 190
 		}
191 191
 	}
192 192
 
@@ -211,14 +211,14 @@  discard block
 block discarded – undo
211 211
 	 */
212 212
 	protected function is_extension_supported() {
213 213
 
214
-		self::$is_compatible = is_array( self::$is_compatible ) ? self::$is_compatible : array( get_called_class() => (bool) self::$is_compatible );
214
+		self::$is_compatible = is_array( self::$is_compatible ) ? self::$is_compatible : array( get_called_class() => (bool)self::$is_compatible );
215 215
 
216 216
 		if ( ! function_exists( 'gravityview' ) ) {
217 217
 			$message = sprintf( __( 'Could not activate the %s Extension; GravityView is not active.', 'gravityview' ), esc_html( $this->_title ) );
218
-		} else if ( false === version_compare( Plugin::$version, $this->_min_gravityview_version , ">=" ) ) {
219
-			$message = sprintf( __( 'The %s Extension requires GravityView Version %s or newer.', 'gravityview' ), esc_html( $this->_title ), '<tt>'.$this->_min_gravityview_version.'</tt>' );
220
-		} else if ( isset( $this->_min_php_version ) && false === version_compare( phpversion(), $this->_min_php_version , ">=" ) ) {
221
-			$message = sprintf( __( 'The %s Extension requires PHP Version %s or newer. Please ask your host to upgrade your server\'s PHP.', 'gravityview' ), esc_html( $this->_title ), '<tt>'.$this->_min_php_version.'</tt>' );
218
+		} else if ( false === version_compare( Plugin::$version, $this->_min_gravityview_version, ">=" ) ) {
219
+			$message = sprintf( __( 'The %s Extension requires GravityView Version %s or newer.', 'gravityview' ), esc_html( $this->_title ), '<tt>' . $this->_min_gravityview_version . '</tt>' );
220
+		} else if ( isset( $this->_min_php_version ) && false === version_compare( phpversion(), $this->_min_php_version, ">=" ) ) {
221
+			$message = sprintf( __( 'The %s Extension requires PHP Version %s or newer. Please ask your host to upgrade your server\'s PHP.', 'gravityview' ), esc_html( $this->_title ), '<tt>' . $this->_min_php_version . '</tt>' );
222 222
 		} else if ( ! empty( $this->_max_gravityview_version ) && false === version_compare( $this->_max_gravityview_version, Plugin::$version, ">" ) ) {
223 223
 			$message = sprintf( __( 'The %s Extension is not compatible with this version of GravityView. Please update the Extension to the latest version.', 'gravityview' ), esc_html( $this->_title ) );
224 224
 		} else {
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 		$lang_dir = dirname( plugin_basename( $path ) ) . '/languages/';
258 258
 
259 259
 		// Traditional WordPress plugin locale filter
260
-		$locale = apply_filters( 'plugin_locale',  get_locale(), $this->_text_domain );
260
+		$locale = apply_filters( 'plugin_locale', get_locale(), $this->_text_domain );
261 261
 
262 262
 		$mofile = sprintf( '%1$s-%2$s.mo', $this->_text_domain, $locale );
263 263
 
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 	 */
285 285
 	public function settings() {
286 286
 		// If doing ajax, get outta here
287
-		if ( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) )  {
287
+		if ( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
288 288
 			return;
289 289
 		}
290 290
 
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 		}
296 296
 
297 297
 		// Don't update if invalid license.
298
-		if ( false === $license || empty( $license['status'] ) || strtolower( $license['status'] ) !== 'valid' ) {
298
+		if ( false === $license || empty( $license[ 'status' ] ) || strtolower( $license[ 'status' ] ) !== 'valid' ) {
299 299
 			return;
300 300
 		}
301 301
 
@@ -304,9 +304,9 @@  discard block
 block discarded – undo
304 304
 			$this->_path,
305 305
 			array(
306 306
             	'version'	=> $this->_version, // current version number
307
-            	'license'	=> $license['license'],
307
+            	'license'	=> $license[ 'license' ],
308 308
 	            'item_id'   => $this->_item_id, // The ID of the download on _remote_update_url
309
-            	'item_name' => $this->_title,  // name of this plugin
309
+            	'item_name' => $this->_title, // name of this plugin
310 310
             	'author' 	=> strip_tags( $this->_author )  // author of this plugin
311 311
           	)
312 312
         );
@@ -335,16 +335,16 @@  discard block
 block discarded – undo
335 335
 	 */
336 336
 	public static function add_notice( $notice = array() ) {
337 337
 
338
-		if ( is_array( $notice ) && empty( $notice['message'] ) ) {
338
+		if ( is_array( $notice ) && empty( $notice[ 'message' ] ) ) {
339 339
 			gravityview()->log->error( 'Notice not set', array( 'data' => $notice ) );
340 340
 			return;
341 341
 		} else if ( is_string( $notice ) ) {
342 342
 			$notice = array( 'message' => $notice );
343 343
 		}
344 344
 
345
-		$notice['class'] = empty( $notice['class'] ) ? 'error' : $notice['class'];
345
+		$notice[ 'class' ] = empty( $notice[ 'class' ] ) ? 'error' : $notice[ 'class' ];
346 346
 
347
-		self::$admin_notices []= $notice;
347
+		self::$admin_notices [ ] = $notice;
348 348
 	}
349 349
 
350 350
 	/**
@@ -358,8 +358,8 @@  discard block
 block discarded – undo
358 358
 		}
359 359
 
360 360
 		foreach ( self::$admin_notices as $key => $notice ) {
361
-			echo '<div id="message" class="'. esc_attr( $notice['class'] ).'">';
362
-			echo wpautop( $notice['message'] );
361
+			echo '<div id="message" class="' . esc_attr( $notice[ 'class' ] ) . '">';
362
+			echo wpautop( $notice[ 'message' ] );
363 363
 			echo '<div class="clear"></div>';
364 364
 			echo '</div>';
365 365
 		}
Please login to merge, or discard this patch.
future/includes/class-gv-template-entry-legacy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 		global $post;
35 35
 
36 36
 		if ( $post ) {
37
-			$context['post'] = $post;
37
+			$context[ 'post' ] = $post;
38 38
 		}
39 39
 
40 40
 		\GV\Mocks\Legacy_Context::push( $context );
Please login to merge, or discard this patch.
future/includes/class-gv-oembed.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 		wp_embed_register_handler( 'gravityview_entry', self::get_entry_regex(), array( __CLASS__, 'render' ), 20000 );
27 27
 		wp_oembed_add_provider( self::get_entry_regex(), self::$provider_url, true );
28 28
 
29
-		if ( ! empty( $_GET['gv_oembed_provider'] ) && ! empty( $_GET['url'] ) ) {
29
+		if ( ! empty( $_GET[ 'gv_oembed_provider' ] ) && ! empty( $_GET[ 'url' ] ) ) {
30 30
 			add_action( 'template_redirect', array( __CLASS__, 'render_provider_request' ) );
31 31
 		}
32 32
 
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
 	 * @return void
44 44
 	 */
45 45
 	public static function render_provider_request() {
46
-		if ( ! empty( $_GET['url'] ) ) {
47
-			$url = $_GET['url'];
46
+		if ( ! empty( $_GET[ 'url' ] ) ) {
47
+			$url = $_GET[ 'url' ];
48 48
 		} else {
49 49
 			header( 'HTTP/1.0 404 Not Found' );
50 50
 			exit;
@@ -111,18 +111,18 @@  discard block
 block discarded – undo
111 111
 	 */
112 112
 	private static function parse_matches( $matches, $url ) {
113 113
 		// If not using permalinks, re-assign values for matching groups
114
-		if ( ! empty( $matches['entry_slug2'] ) ) {
115
-			$matches['is_cpt'] = $matches['is_cpt2'];
116
-			$matches['slug'] = $matches['slug2'];
117
-			$matches['entry_slug'] = $matches['entry_slug2'];
118
-			unset( $matches['is_cpt2'], $matches['slug2'], $matches['entry_slug2'] );
114
+		if ( ! empty( $matches[ 'entry_slug2' ] ) ) {
115
+			$matches[ 'is_cpt' ] = $matches[ 'is_cpt2' ];
116
+			$matches[ 'slug' ] = $matches[ 'slug2' ];
117
+			$matches[ 'entry_slug' ] = $matches[ 'entry_slug2' ];
118
+			unset( $matches[ 'is_cpt2' ], $matches[ 'slug2' ], $matches[ 'entry_slug2' ] );
119 119
 		}
120 120
 
121
-		if ( empty( $matches['entry_slug'] ) ) {
121
+		if ( empty( $matches[ 'entry_slug' ] ) ) {
122 122
 			gravityview()->log->error( 'Entry slug not parsed by regex.', array( 'data' => $matches ) );
123 123
 			return null;
124 124
 		} else {
125
-			$entry_id = $matches['entry_slug'];
125
+			$entry_id = $matches[ 'entry_slug' ];
126 126
 		}
127 127
 
128 128
 		if ( ! $entry = \GV\GF_Entry::by_id( $entry_id ) ) {
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 		}
132 132
 
133 133
 		if ( ! $view_id = url_to_postid( $url ) ) {
134
-			$view = \GV\View::from_post( get_page_by_path( $matches['slug'], OBJECT, 'gravityview' ) );
134
+			$view = \GV\View::from_post( get_page_by_path( $matches[ 'slug' ], OBJECT, 'gravityview' ) );
135 135
 		} else {
136 136
 			$view = \GV\View::by_id( $view_id );
137 137
 		}
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
 
164 164
 		return '
165 165
 		<div class="loading-placeholder" style="background-color:#e6f0f5;">
166
-			<h3 style="margin:0; padding:0; font-family: -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, Oxygen-Sans, Ubuntu, Cantarell, \'Helvetica Neue\', sans-serif;">'.$image.$embed_heading.'</h3>
166
+			<h3 style="margin:0; padding:0; font-family: -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, Oxygen-Sans, Ubuntu, Cantarell, \'Helvetica Neue\', sans-serif;">'.$image . $embed_heading . '</h3>
167 167
 			<p style="margin:0; padding:0; font-family: -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, Oxygen-Sans, Ubuntu, Cantarell, \'Helvetica Neue\', sans-serif;">
168
-				'.$embed_text.'
168
+				'.$embed_text . '
169 169
 			</p>
170 170
 			<br style="clear: both;">
171 171
 		</div>';
@@ -179,8 +179,8 @@  discard block
 block discarded – undo
179 179
 	private static function render_preview_notice() {
180 180
 		$floaty = \GravityView_Admin::get_floaty();
181 181
 		$title = esc_html__( 'This will look better when it is embedded.', 'gravityview' );
182
-		$message = esc_html__( 'Styles don\'t get loaded when being previewed, so the content below will look strange. Don\'t be concerned!', 'gravityview');
183
-		return '<div class="updated notice">'.$floaty.'<h3>'.$title.'</h3><p>'.$message.'</p><br style="clear:both;" /></div>';
182
+		$message = esc_html__( 'Styles don\'t get loaded when being previewed, so the content below will look strange. Don\'t be concerned!', 'gravityview' );
183
+		return '<div class="updated notice">' . $floaty . '<h3>' . $title . '</h3><p>' . $message . '</p><br style="clear:both;" /></div>';
184 184
 	}
185 185
 
186 186
 	/**
@@ -199,13 +199,13 @@  discard block
 block discarded – undo
199 199
 			return __( 'You are not allowed to view this content.', 'gravityview' );
200 200
 		}
201 201
 
202
-		if ( $entry['status'] != 'active' ) {
202
+		if ( $entry[ 'status' ] != 'active' ) {
203 203
 			gravityview()->log->notice( 'Entry ID #{entry_id} is not active', array( 'entry_id' => $entry->ID ) );
204 204
 			return __( 'You are not allowed to view this content.', 'gravityview' );
205 205
 		}
206 206
 
207 207
 		if ( $view->settings->get( 'show_only_approved' ) ) {
208
-			if ( ! \GravityView_Entry_Approval_Status::is_approved( gform_get_meta( $entry->ID, \GravityView_Entry_Approval::meta_key ) )  ) {
208
+			if ( ! \GravityView_Entry_Approval_Status::is_approved( gform_get_meta( $entry->ID, \GravityView_Entry_Approval::meta_key ) ) ) {
209 209
 				gravityview()->log->error( 'Entry ID #{entry_id} is not approved for viewing', array( 'entry_id' => $entry->ID ) );
210 210
 				return __( 'You are not allowed to view this content.', 'gravityview' );
211 211
 			}
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 		// Catch either
270 270
 		$match_regex = "(?:{$using_permalinks}|{$not_using_permalinks})";
271 271
 
272
-		return '#'.$match_regex.'#i';
272
+		return '#' . $match_regex . '#i';
273 273
 	}
274 274
 
275 275
 	/**
Please login to merge, or discard this patch.
future/includes/class-gv-template-view-list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,9 +64,9 @@
 block discarded – undo
64 64
 		 */
65 65
 		$hide_empty = apply_filters( 'gravityview/render/hide-empty-zone', Utils::get( $extras, 'hide_empty', $this->view->settings->get( 'hide_empty', false ) ), $context );
66 66
 
67
-		$extras['hide_empty'] = $hide_empty;
68
-		$extras['label'] = $label;
69
-		$extras['value'] = $value;
67
+		$extras[ 'hide_empty' ] = $hide_empty;
68
+		$extras[ 'label' ] = $label;
69
+		$extras[ 'value' ] = $value;
70 70
 
71 71
 		return \gravityview_field_output( $extras, $context );
72 72
 	}
Please login to merge, or discard this patch.
future/includes/class-gv-template-field.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -146,59 +146,59 @@  discard block
 block discarded – undo
146 146
 
147 147
 		if ( $this->request && $this->request->is_view() && $post ) {
148 148
 			if ( $this->field && $this->field->type ) {
149
-				$specifics []= sprintf( '%spost-%d-view-%d-field-%s-%s.php', $slug_dir, $post->ID, $this->view->ID, $this->field->type, $slug_name );
150
-				$this->field->inputType && $specifics []= sprintf( '%spost-%d-view-%d-field-%s-%s.php', $slug_dir, $post->ID, $this->view->ID, $this->field->inputType, $slug_name );
151
-				$specifics []= sprintf( '%spost-%d-view-%d-field-%s.php', $slug_dir, $post->ID, $this->view->ID, $this->field->type );
152
-				$this->field->inputType && $specifics []= sprintf( '%spost-%d-view-%d-field-%s.php', $slug_dir, $post->ID, $this->view->ID, $this->field->inputType );
153
-				$specifics []= sprintf( '%spost-%d-field-%s-%s.php', $slug_dir, $post->ID, $this->field->type, $slug_name );
154
-				$this->field->inputType && $specifics []= sprintf( '%spost-%d-field-%s-%s.php', $slug_dir, $post->ID, $this->field->inputType, $slug_name );
155
-				$specifics []= sprintf( '%spost-%d-field-%s.php', $slug_dir, $post->ID, $this->field->type );
156
-				$this->field->inputType &&  $specifics []= sprintf( '%spost-%d-field-%s.php', $slug_dir, $post->ID, $this->field->inputType );
149
+				$specifics [ ] = sprintf( '%spost-%d-view-%d-field-%s-%s.php', $slug_dir, $post->ID, $this->view->ID, $this->field->type, $slug_name );
150
+				$this->field->inputType && $specifics [ ] = sprintf( '%spost-%d-view-%d-field-%s-%s.php', $slug_dir, $post->ID, $this->view->ID, $this->field->inputType, $slug_name );
151
+				$specifics [ ] = sprintf( '%spost-%d-view-%d-field-%s.php', $slug_dir, $post->ID, $this->view->ID, $this->field->type );
152
+				$this->field->inputType && $specifics [ ] = sprintf( '%spost-%d-view-%d-field-%s.php', $slug_dir, $post->ID, $this->view->ID, $this->field->inputType );
153
+				$specifics [ ] = sprintf( '%spost-%d-field-%s-%s.php', $slug_dir, $post->ID, $this->field->type, $slug_name );
154
+				$this->field->inputType && $specifics [ ] = sprintf( '%spost-%d-field-%s-%s.php', $slug_dir, $post->ID, $this->field->inputType, $slug_name );
155
+				$specifics [ ] = sprintf( '%spost-%d-field-%s.php', $slug_dir, $post->ID, $this->field->type );
156
+				$this->field->inputType && $specifics [ ] = sprintf( '%spost-%d-field-%s.php', $slug_dir, $post->ID, $this->field->inputType );
157 157
 			}
158 158
 
159
-			$specifics []= sprintf( '%spost-%d-view-%d-field-%s.php', $slug_dir, $post->ID, $this->view->ID, $slug_name );
160
-			$specifics []= sprintf( '%spost-%d-view-%d-field.php', $slug_dir, $post->ID, $this->view->ID );
161
-			$specifics []= sprintf( '%spost-%d-field-%s.php', $slug_dir, $post->ID, $slug_name );
162
-			$specifics []= sprintf( '%spost-%d-field.php', $slug_dir, $post->ID );
159
+			$specifics [ ] = sprintf( '%spost-%d-view-%d-field-%s.php', $slug_dir, $post->ID, $this->view->ID, $slug_name );
160
+			$specifics [ ] = sprintf( '%spost-%d-view-%d-field.php', $slug_dir, $post->ID, $this->view->ID );
161
+			$specifics [ ] = sprintf( '%spost-%d-field-%s.php', $slug_dir, $post->ID, $slug_name );
162
+			$specifics [ ] = sprintf( '%spost-%d-field.php', $slug_dir, $post->ID );
163 163
 		}
164 164
 		
165 165
 		/** Field-specific */
166 166
 		if ( $this->field && $this->view ) {
167 167
 
168 168
 			if ( $this->field->ID ) {
169
-				$specifics []= sprintf( '%sform-%d-field-%d-%s.php', $slug_dir, $this->view->form->ID, $this->field->ID, $slug_name );
170
-				$specifics []= sprintf( '%sform-%d-field-%d.php', $slug_dir, $this->view->form->ID, $this->field->ID );
169
+				$specifics [ ] = sprintf( '%sform-%d-field-%d-%s.php', $slug_dir, $this->view->form->ID, $this->field->ID, $slug_name );
170
+				$specifics [ ] = sprintf( '%sform-%d-field-%d.php', $slug_dir, $this->view->form->ID, $this->field->ID );
171 171
 			}
172 172
 
173 173
 			if ( $this->field->type ) {
174
-				$specifics []= sprintf( '%sform-%d-field-%s-%s.php', $slug_dir, $this->view->form->ID, $this->field->type, $slug_name );
175
-				$this->field->inputType && $specifics []= sprintf( '%sform-%d-field-%s-%s.php', $slug_dir, $this->view->form->ID, $this->field->inputType, $slug_name );
176
-				$specifics []= sprintf( '%sform-%d-field-%s.php', $slug_dir, $this->view->form->ID, $this->field->type );
177
-				$this->field->inputType && $specifics []= sprintf( '%sform-%d-field-%s.php', $slug_dir, $this->view->form->ID, $this->field->inputType );
178
-
179
-				$specifics []= sprintf( '%sview-%d-field-%s-%s.php', $slug_dir, $this->view->ID, $this->field->type, $slug_name );
180
-				$this->field->inputType && $specifics []= sprintf( '%sview-%d-field-%s-%s.php', $slug_dir, $this->view->ID, $this->field->inputType, $slug_name );
181
-				$specifics []= sprintf( '%sview-%d-field-%s.php', $slug_dir, $this->view->ID, $this->field->type );
182
-				$this->field->inputType && $specifics []= sprintf( '%sview-%d-field-%s.php', $slug_dir, $this->view->ID, $this->field->inputType );
183
-
184
-				$specifics []= sprintf( '%sfield-%s-%s.php', $slug_dir, $this->field->type, $slug_name );
185
-				$this->field->inputType && $specifics []= sprintf( '%sfield-%s-%s.php', $slug_dir, $this->field->inputType, $slug_name );
186
-				$specifics []= sprintf( '%sfield-%s.php', $slug_dir, $this->field->type );
187
-				$this->field->inputType && $specifics []= sprintf( '%sfield-%s.php', $slug_dir, $this->field->inputType );
174
+				$specifics [ ] = sprintf( '%sform-%d-field-%s-%s.php', $slug_dir, $this->view->form->ID, $this->field->type, $slug_name );
175
+				$this->field->inputType && $specifics [ ] = sprintf( '%sform-%d-field-%s-%s.php', $slug_dir, $this->view->form->ID, $this->field->inputType, $slug_name );
176
+				$specifics [ ] = sprintf( '%sform-%d-field-%s.php', $slug_dir, $this->view->form->ID, $this->field->type );
177
+				$this->field->inputType && $specifics [ ] = sprintf( '%sform-%d-field-%s.php', $slug_dir, $this->view->form->ID, $this->field->inputType );
178
+
179
+				$specifics [ ] = sprintf( '%sview-%d-field-%s-%s.php', $slug_dir, $this->view->ID, $this->field->type, $slug_name );
180
+				$this->field->inputType && $specifics [ ] = sprintf( '%sview-%d-field-%s-%s.php', $slug_dir, $this->view->ID, $this->field->inputType, $slug_name );
181
+				$specifics [ ] = sprintf( '%sview-%d-field-%s.php', $slug_dir, $this->view->ID, $this->field->type );
182
+				$this->field->inputType && $specifics [ ] = sprintf( '%sview-%d-field-%s.php', $slug_dir, $this->view->ID, $this->field->inputType );
183
+
184
+				$specifics [ ] = sprintf( '%sfield-%s-%s.php', $slug_dir, $this->field->type, $slug_name );
185
+				$this->field->inputType && $specifics [ ] = sprintf( '%sfield-%s-%s.php', $slug_dir, $this->field->inputType, $slug_name );
186
+				$specifics [ ] = sprintf( '%sfield-%s.php', $slug_dir, $this->field->type );
187
+				$this->field->inputType && $specifics [ ] = sprintf( '%sfield-%s.php', $slug_dir, $this->field->inputType );
188 188
 			}
189 189
 		}
190 190
 
191 191
 		if ( $this->view ) {
192 192
 			/** Generic field templates */
193
-			$specifics []= sprintf( '%sview-%d-field-%s.php', $slug_dir, $this->view->ID, $slug_name );
194
-			$specifics []= sprintf( '%sform-%d-field-%s.php', $slug_dir, $this->view->form->ID, $slug_name );
193
+			$specifics [ ] = sprintf( '%sview-%d-field-%s.php', $slug_dir, $this->view->ID, $slug_name );
194
+			$specifics [ ] = sprintf( '%sform-%d-field-%s.php', $slug_dir, $this->view->form->ID, $slug_name );
195 195
 
196
-			$specifics []= sprintf( '%sview-%d-field.php', $slug_dir, $this->view->ID );
197
-			$specifics []= sprintf( '%sform-%d-field.php', $slug_dir, $this->view->form->ID );
196
+			$specifics [ ] = sprintf( '%sview-%d-field.php', $slug_dir, $this->view->ID );
197
+			$specifics [ ] = sprintf( '%sform-%d-field.php', $slug_dir, $this->view->form->ID );
198 198
 		}
199 199
 
200
-		$specifics []= sprintf( '%sfield-%s.php', $slug_dir, $slug_name );
201
-		$specifics []= sprintf( '%sfield.php', $slug_dir );
200
+		$specifics [ ] = sprintf( '%sfield-%s.php', $slug_dir, $slug_name );
201
+		$specifics [ ] = sprintf( '%sfield.php', $slug_dir );
202 202
 
203 203
 
204 204
 		return array_merge( $specifics, $templates );
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 			/** Prevent any PHP warnings that may be generated. */
225 225
 			ob_start();
226 226
 
227
-			$display_value = \GFCommon::get_lead_field_display( $this->field->field, $value, $this->entry['currency'], false, 'html' );
227
+			$display_value = \GFCommon::get_lead_field_display( $this->field->field, $value, $this->entry[ 'currency' ], false, 'html' );
228 228
 
229 229
 			if ( $errors = ob_get_clean() ) {
230 230
 				gravityview()->log->error( 'Errors when calling GFCommon::get_lead_field_display()', array( 'data' => $errors ) );
Please login to merge, or discard this patch.
future/includes/class-gv-form-gravityforms.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 		$self = new self();
56 56
 		$self->form = $form;
57 57
 
58
-		$self->ID = $self->form['id'];
58
+		$self->ID = $self->form[ 'id' ];
59 59
 
60 60
 		return $self;
61 61
 	}
@@ -98,11 +98,11 @@  discard block
 block discarded – undo
98 98
 
99 99
 			/** The offset and limit */
100 100
 			if ( ! empty( $offset->limit ) ) {
101
-				$paging['page_size'] = $offset->limit;
101
+				$paging[ 'page_size' ] = $offset->limit;
102 102
 			}
103 103
 
104 104
 			if ( ! empty( $offset->offset ) ) {
105
-				$paging['offset'] = $offset->offset;
105
+				$paging[ 'offset' ] = $offset->offset;
106 106
 			}
107 107
 
108 108
 			foreach ( \GFAPI::get_entries( $form->ID, $search_criteria, $sorting, $paging ) as $entry ) {
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
 	 */
160 160
 	public function get_fields() {
161 161
 		$fields = array();
162
-		foreach ( $this['fields'] as $field ) {
163
-			foreach ( empty( $field['inputs'] ) ? array( $field['id'] ) : wp_list_pluck( $field['inputs'], 'id' ) as $id ) {
162
+		foreach ( $this[ 'fields' ] as $field ) {
163
+			foreach ( empty( $field[ 'inputs' ] ) ? array( $field[ 'id' ] ) : wp_list_pluck( $field[ 'inputs' ], 'id' ) as $id ) {
164 164
 				if ( is_numeric( $id ) ) {
165 165
 					$fields[ $id ] = self::get_field( $this, $id );
166 166
 				} else {
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 	 * @return bool Whether the offset exists or not.
198 198
 	 */
199 199
 	public function offsetExists( $offset ) {
200
-		return isset( $this->form[$offset] );
200
+		return isset( $this->form[ $offset ] );
201 201
 	}
202 202
 
203 203
 	/**
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 	 * @return mixed The value of the requested form data.
213 213
 	 */
214 214
 	public function offsetGet( $offset ) {
215
-		return $this->form[$offset];
215
+		return $this->form[ $offset ];
216 216
 	}
217 217
 
218 218
 	/**
Please login to merge, or discard this patch.
future/includes/class-gv-core.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -113,14 +113,14 @@
 block discarded – undo
113 113
 
114 114
 		/** Require critical legacy core files. @todo Deprecate */
115 115
 		require_once $this->plugin->dir( 'includes/helper-functions.php' );
116
-		require_once $this->plugin->dir( 'includes/class-common.php');
117
-		require_once $this->plugin->dir( 'includes/connector-functions.php');
116
+		require_once $this->plugin->dir( 'includes/class-common.php' );
117
+		require_once $this->plugin->dir( 'includes/connector-functions.php' );
118 118
 		require_once $this->plugin->dir( 'includes/class-gravityview-compatibility.php' );
119 119
 		require_once $this->plugin->dir( 'includes/class-gravityview-roles-capabilities.php' );
120 120
 		require_once $this->plugin->dir( 'includes/class-gravityview-admin-notices.php' );
121 121
 		require_once $this->plugin->dir( 'includes/class-admin.php' );
122
-		require_once $this->plugin->dir( 'includes/class-post-types.php');
123
-		require_once $this->plugin->dir( 'includes/class-cache.php');
122
+		require_once $this->plugin->dir( 'includes/class-post-types.php' );
123
+		require_once $this->plugin->dir( 'includes/class-cache.php' );
124 124
 
125 125
 		/**
126 126
 		 * GravityView extensions and widgets.
Please login to merge, or discard this patch.
future/includes/class-gv-template-legacy-override.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -98,15 +98,15 @@  discard block
 block discarded – undo
98 98
 		$additional = array();
99 99
 
100 100
 		// form-19-table-body.php
101
-		$additional[] = sprintf( 'form-%d-%s-%s.php', $this->view->form ? $this->view->form->ID : 0, $slug, $name );
101
+		$additional[ ] = sprintf( 'form-%d-%s-%s.php', $this->view->form ? $this->view->form->ID : 0, $slug, $name );
102 102
 
103 103
 		// view-3-table-body.php
104
-		$additional[] = sprintf( 'view-%d-%s-%s.php', $this->view->ID, $slug, $name );
104
+		$additional[ ] = sprintf( 'view-%d-%s-%s.php', $this->view->ID, $slug, $name );
105 105
 
106 106
 		global $post;
107 107
 		if ( $post ) {
108 108
 			// page-19-table-body.php
109
-			$additional[] = sprintf( 'page-%d-%s-%s.php', $post->ID, $slug, $name );
109
+			$additional[ ] = sprintf( 'page-%d-%s-%s.php', $post->ID, $slug, $name );
110 110
 		}
111 111
 
112 112
 		// Combine with existing table-body.php and table.php
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 		ob_start();
131 131
 
132 132
 		$request = new Mock_Request();
133
-		$request->returns['is_view'] = $this->view;
133
+		$request->returns[ 'is_view' ] = $this->view;
134 134
 
135 135
 		/**
136 136
 		 * You got one shot. One opportunity. To render all the widgets you have ever wanted.
@@ -144,17 +144,17 @@  discard block
 block discarded – undo
144 144
 		foreach ( array( 'gravityview_before', 'gravityview_after' ) as $hook ) {
145 145
 			/** WordPress 4.6 and lower compatibility, when WP_Hook classes were still absent. */
146 146
 			if ( is_array( $wp_filter[ $hook ] ) ) {
147
-				if ( ! empty( $wp_filter[ $hook ][10] ) ) {
148
-					foreach ( $wp_filter[ $hook ][10] as $function_key => $callback ) {
147
+				if ( ! empty( $wp_filter[ $hook ][ 10 ] ) ) {
148
+					foreach ( $wp_filter[ $hook ][ 10 ] as $function_key => $callback ) {
149 149
 						if ( strpos( $function_key, 'render_widget_hooks' ) ) {
150
-							unset( $wp_filter[ $hook ][10][ $function_key ] );
150
+							unset( $wp_filter[ $hook ][ 10 ][ $function_key ] );
151 151
 						}
152 152
 					}
153 153
 				}
154 154
 			} else {
155
-				foreach ( $wp_filter[ $hook ]->callbacks[10] as $function_key => $callback ) {
155
+				foreach ( $wp_filter[ $hook ]->callbacks[ 10 ] as $function_key => $callback ) {
156 156
 					if ( strpos( $function_key, 'render_widget_hooks' ) ) {
157
-						unset( $wp_filter[ $hook ]->callbacks[10][ $function_key ] );
157
+						unset( $wp_filter[ $hook ]->callbacks[ 10 ][ $function_key ] );
158 158
 					}
159 159
 				}
160 160
 			}
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 		 */
166 166
 		if ( $this->entry ) {
167 167
 
168
-			$request->returns['is_entry'] = $this->entry;
168
+			$request->returns[ 'is_entry' ] = $this->entry;
169 169
 
170 170
 			global $post;
171 171
 
@@ -209,8 +209,8 @@  discard block
 block discarded – undo
209 209
 					'fields' => $this->view->fields->by_visible(),
210 210
 					'in_the_loop' => true,
211 211
 				), empty( $parameters ) ? array() : array(
212
-					'paging' => $parameters['paging'],
213
-					'sorting' => $parameters['sorting'],
212
+					'paging' => $parameters[ 'paging' ],
213
+					'sorting' => $parameters[ 'sorting' ],
214 214
 				), $post ? array() : array(
215 215
 					'post' => $post,
216 216
 				) ) );
Please login to merge, or discard this patch.