Completed
Push — develop ( 14ae0e...1a85cd )
by
unknown
16:51
created
future/includes/class-gv-collection-entry-sort.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
 		if ( $this->field ) {
79 79
 			return array(
80 80
 				'key' => $this->field->ID,
81
-				'direction' => $this->direction ? : self::ASC,
81
+				'direction' => $this->direction ?: self::ASC,
82 82
 				'is_numeric' => self::ALPHA ? true : false,
83 83
 			);
84 84
 		}
Please login to merge, or discard this patch.
future/includes/class-gv-wrappers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@
 block discarded – undo
50 50
 		/**
51 51
 		 * By array.
52 52
 		 */
53
-		if ( is_array( $view ) && ! empty( $view['id'] ) ) {
54
-			return $this->get( $view['id'] );
53
+		if ( is_array( $view ) && ! empty( $view[ 'id' ] ) ) {
54
+			return $this->get( $view[ 'id' ] );
55 55
 		}
56 56
 
57 57
 		/**
Please login to merge, or discard this patch.
future/includes/rest/class-gv-rest-core.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 		require_once gravityview()->plugin->dir( 'future/includes/rest/class-gv-rest-route.php' );
22 22
 		require_once gravityview()->plugin->dir( 'future/includes/rest/class-gv-rest-views-route.php' );
23 23
 
24
-		self::$routes['views'] = $views = new Views_Route();
24
+		self::$routes[ 'views' ] = $views = new Views_Route();
25 25
 		$views->register_routes();
26 26
 	}
27 27
 
Please login to merge, or discard this patch.
future/includes/class-gv-shortcode-gvfield.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
 		 */
44 44
 		$atts = apply_filters( 'gravityview/shortcodes/gvfield/atts', $atts );
45 45
 
46
-		if ( ! $view = \GV\View::by_id( $atts['view_id'] ) ) {
47
-			gravityview()->log->error( 'View #{view_id} not found', array( 'view_id' => $atts['view_id'] ) );
46
+		if ( ! $view = \GV\View::by_id( $atts[ 'view_id' ] ) ) {
47
+			gravityview()->log->error( 'View #{view_id} not found', array( 'view_id' => $atts[ 'view_id' ] ) );
48 48
 			return apply_filters( 'gravityview/shortcodes/gvfield/output', '', $view, null, null, $atts );
49 49
 		}
50 50
 
51
-		switch( $atts['entry_id'] ):
51
+		switch ( $atts[ 'entry_id' ] ):
52 52
 			case 'last':
53 53
 				if ( gravityview()->plugin->supports( \GV\Plugin::FEATURE_GFQUERY ) ) {
54 54
 					/**
@@ -57,17 +57,17 @@  discard block
 block discarded – undo
57 57
 					 * Since we're using \GF_Query shorthand initialization we have to reverse the order parameters here.
58 58
 					 */
59 59
 					add_filter( 'gravityview_get_entries', $filter = function( $parameters, $args, $form_id ) {
60
-						if ( ! empty( $parameters['sorting'] ) ) {
60
+						if ( ! empty( $parameters[ 'sorting' ] ) ) {
61 61
 							/**
62 62
 							 * Reverse existing sorts.
63 63
 							 */
64
-							$sort = &$parameters['sorting'];
65
-							$sort['direction'] = $sort['direction'] == 'RAND' ? : ( $sort['direction'] == 'ASC' ? 'DESC' : 'ASC' );
64
+							$sort = &$parameters[ 'sorting' ];
65
+							$sort[ 'direction' ] = $sort[ 'direction' ] == 'RAND' ?: ( $sort[ 'direction' ] == 'ASC' ? 'DESC' : 'ASC' );
66 66
 						} else {
67 67
 							/**
68 68
 							 * Otherwise, sort by date_created.
69 69
 							 */
70
-							$parameters['sorting'] = array(
70
+							$parameters[ 'sorting' ] = array(
71 71
 								'key' => 'id',
72 72
 								'direction' => 'ASC',
73 73
 								'is_numeric' => true
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
 					/** If a sort already exists, reverse it. */
84 84
 					if ( $sort = end( $entries->sorts ) ) {
85
-						$entries = $entries->sort( new \GV\Entry_Sort( $sort->field, $sort->direction == \GV\Entry_Sort::RAND ? : ( $sort->direction == \GV\Entry_Sort::ASC ? \GV\Entry_Sort::DESC : \GV\Entry_Sort::ASC ) ), $sort->mode );
85
+						$entries = $entries->sort( new \GV\Entry_Sort( $sort->field, $sort->direction == \GV\Entry_Sort::RAND ?: ( $sort->direction == \GV\Entry_Sort::ASC ? \GV\Entry_Sort::DESC : \GV\Entry_Sort::ASC ) ), $sort->mode );
86 86
 					} else {
87 87
 						/** Otherwise, sort by date_created */
88 88
 						$entries = $entries->sort( new \GV\Entry_Sort( \GV\Internal_Field::by_id( 'id' ), \GV\Entry_Sort::ASC ), \GV\Entry_Sort::NUMERIC );
@@ -99,20 +99,20 @@  discard block
 block discarded – undo
99 99
 				}
100 100
 				break;
101 101
 			default:
102
-				if ( ! $entry = \GV\GF_Entry::by_id( $atts['entry_id'] ) ) {
103
-					gravityview()->log->error( 'Entry #{entry_id} not found', array( 'view_id' => $atts['view_id'] ) );
102
+				if ( ! $entry = \GV\GF_Entry::by_id( $atts[ 'entry_id' ] ) ) {
103
+					gravityview()->log->error( 'Entry #{entry_id} not found', array( 'view_id' => $atts[ 'view_id' ] ) );
104 104
 					return apply_filters( 'gravityview/shortcodes/gvfield/output', '', $view, $entry, null, $atts );
105 105
 				}
106 106
 		endswitch;
107 107
 
108
-		$field = is_numeric( $atts['field_id'] ) ? \GV\GF_Field::by_id( $view->form, $atts['field_id'] ) : \GV\Internal_Field::by_id( $atts['field_id'] );
108
+		$field = is_numeric( $atts[ 'field_id' ] ) ? \GV\GF_Field::by_id( $view->form, $atts[ 'field_id' ] ) : \GV\Internal_Field::by_id( $atts[ 'field_id' ] );
109 109
 
110 110
 		if ( ! $field ) {
111
-			gravityview()->log->error( 'Field #{field_id} not found', array( 'view_id' => $atts['field_id'] ) );
111
+			gravityview()->log->error( 'Field #{field_id} not found', array( 'view_id' => $atts[ 'field_id' ] ) );
112 112
 			return apply_filters( 'gravityview/shortcodes/gvfield/output', '', $view, $entry, $field, $atts );
113 113
 		}
114 114
 
115
-		if ( $view->form->ID != $entry['form_id'] ) {
115
+		if ( $view->form->ID != $entry[ 'form_id' ] ) {
116 116
 			gravityview()->log->error( 'Entry does not belong to view (form mismatch)' );
117 117
 			return apply_filters( 'gravityview/shortcodes/gvfield/output', '', $view, $entry, $atts );
118 118
 		}
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 			return apply_filters( 'gravityview/shortcodes/gvfield/output', get_the_password_form( $view->ID ), $view, $entry, $atts );
123 123
 		}
124 124
 
125
-		if ( ! $view->form  ) {
125
+		if ( ! $view->form ) {
126 126
 			gravityview()->log->notice( 'View #{id} has no form attached to it.', array( 'id' => $view->ID ) );
127 127
 
128 128
 			/**
@@ -145,13 +145,13 @@  discard block
 block discarded – undo
145 145
 		}
146 146
 
147 147
 		/** Unapproved entries. */
148
-		if ( $entry['status'] != 'active' ) {
148
+		if ( $entry[ 'status' ] != 'active' ) {
149 149
 			gravityview()->log->notice( 'Entry ID #{entry_id} is not active', array( 'entry_id' => $entry->ID ) );
150 150
 			return apply_filters( 'gravityview/shortcodes/gvfield/output', '', $view, $entry, $atts );
151 151
 		}
152 152
 
153 153
 		if ( $view->settings->get( 'show_only_approved' ) ) {
154
-			if ( ! \GravityView_Entry_Approval_Status::is_approved( gform_get_meta( $entry->ID, \GravityView_Entry_Approval::meta_key ) )  ) {
154
+			if ( ! \GravityView_Entry_Approval_Status::is_approved( gform_get_meta( $entry->ID, \GravityView_Entry_Approval::meta_key ) ) ) {
155 155
 				gravityview()->log->error( 'Entry ID #{entry_id} is not approved for viewing', array( 'entry_id' => $entry->ID ) );
156 156
 				return apply_filters( 'gravityview/shortcodes/gvfield/output', '', $view, $entry, $atts );
157 157
 			}
Please login to merge, or discard this patch.
future/includes/class-gv-template-view.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -108,13 +108,13 @@
 block discarded – undo
108 108
 		global $post;
109 109
 
110 110
 		if ( ! $this->request->is_view() && $post ) {
111
-			$specifics []= sprintf( '%spost-%d-view-%d-%s.php', $slug_dir, $post->ID, $this->view->ID, $slug_name );
112
-			$specifics []= sprintf( '%spost-%d-%s.php', $slug_dir, $post->ID, $slug_name );
111
+			$specifics [ ] = sprintf( '%spost-%d-view-%d-%s.php', $slug_dir, $post->ID, $this->view->ID, $slug_name );
112
+			$specifics [ ] = sprintf( '%spost-%d-%s.php', $slug_dir, $post->ID, $slug_name );
113 113
 		}
114 114
 
115 115
 		
116
-		$specifics []= sprintf( '%sview-%d-%s.php', $slug_dir, $this->view->ID, $slug_name );
117
-		$specifics []= sprintf( '%sform-%d-%s.php', $slug_dir, $this->view->form->ID, $slug_name );
116
+		$specifics [ ] = sprintf( '%sview-%d-%s.php', $slug_dir, $this->view->ID, $slug_name );
117
+		$specifics [ ] = sprintf( '%sform-%d-%s.php', $slug_dir, $this->view->form->ID, $slug_name );
118 118
 
119 119
 		return array_merge( $specifics, $templates );
120 120
 	}
Please login to merge, or discard this patch.
future/includes/class-gv-license-handler.php 3 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 			'author'    => self::author,
97 97
 			'language'  => get_locale(),
98 98
 			'url'       => home_url(),
99
-		    'beta'      => $this->settings->get( 'beta' ),
99
+			'beta'      => $this->settings->get( 'beta' ),
100 100
 		);
101 101
 
102 102
 		if ( ! empty( $action ) ) {
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 	private function license_call_update_settings( $license_data, $data ) {
464 464
 		$settings = array();
465 465
 
466
-        $settings['license_key'] = $license_data->license_key = trim( $data['license'] );
466
+		$settings['license_key'] = $license_data->license_key = trim( $data['license'] );
467 467
 		$settings['license_key_status'] = $license_data->license;
468 468
 		$settings['license_key_response'] = (array)$license_data;
469 469
 
@@ -597,14 +597,14 @@  discard block
 block discarded – undo
597 597
 			// Call the custom API.
598 598
 			$response = wp_remote_post( self::url, array(
599 599
 				'timeout'   => 15,
600
-			    'sslverify' => false,
601
-			    'body'      =>  array(
602
-				    'edd_action' => 'check_license',
603
-				    'license'    => trim( $this->settings->get( 'license_key' ) ),
604
-				    'item_name'  => self::name,
605
-				    'url'        => home_url(),
606
-				    'site_data'  => $this->get_site_data(),
607
-			    ),
600
+				'sslverify' => false,
601
+				'body'      =>  array(
602
+					'edd_action' => 'check_license',
603
+					'license'    => trim( $this->settings->get( 'license_key' ) ),
604
+					'item_name'  => self::name,
605
+					'url'        => home_url(),
606
+					'site_data'  => $this->get_site_data(),
607
+				),
608 608
 			));
609 609
 
610 610
 			// make sure the response came back okay
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -174,7 +174,8 @@  discard block
 block discarded – undo
174 174
 			if ( empty( $license_data ) ) {
175 175
 				if ( $is_ajax ) {
176 176
 					exit( json_encode( array() ) );
177
-				} else { // Non-ajax call
177
+				} else {
178
+// Non-ajax call
178 179
 					return json_encode( array() );
179 180
 				}
180 181
 			}
@@ -207,7 +208,8 @@  discard block
 block discarded – undo
207 208
 
208 209
 		if ( $is_ajax ) {
209 210
 			exit( $json );
210
-		} else { // Non-ajax call
211
+		} else {
212
+// Non-ajax call
211 213
 			return ( Utils::_GET( 'format', Utils::get( $data, 'format' ) ) === 'object' ) ? $license_data : $json;
212 214
 		}
213 215
 	}
Please login to merge, or discard this patch.
Spacing   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 		);
103 103
 
104 104
 		if ( ! empty( $action ) ) {
105
-			$settings['edd_action'] = esc_attr( $action );
105
+			$settings[ 'edd_action' ] = esc_attr( $action );
106 106
 		}
107 107
 
108 108
 		return array_map( 'urlencode', $settings );
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 			'format' => 'json',
159 159
 		) );
160 160
 
161
-		if ( $is_ajax && empty( $data['license'] ) ) {
161
+		if ( $is_ajax && empty( $data[ 'license' ] ) ) {
162 162
 			die( -1 );
163 163
 		}
164 164
 
@@ -186,11 +186,11 @@  discard block
 block discarded – undo
186 186
 
187 187
 			$json = json_encode( $license_data );
188 188
 
189
-			$update_license = Utils::get( $data, 'update' ) || 'gravityview_license' === Utils::_POST('action');
189
+			$update_license = Utils::get( $data, 'update' ) || 'gravityview_license' === Utils::_POST( 'action' );
190 190
 
191 191
 			$is_check_action_button = ( 'check_license' === Utils::get( $data, 'edd_action' ) && defined( 'DOING_AJAX' ) && DOING_AJAX );
192 192
 
193
-			do_action('gravityview/admin_installer/delete_downloads_data', true );
193
+			do_action( 'gravityview/admin_installer/delete_downloads_data', true );
194 194
 
195 195
 			if ( $is_check_action_button ) {
196 196
 				delete_transient( self::status_transient_key );
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 			// most likely a mistake.
202 202
 			} else if ( $license_data->license !== 'failed' && $update_license ) {
203 203
 
204
-				if ( ! empty( $data['field_id'] ) ) {
204
+				if ( ! empty( $data[ 'field_id' ] ) ) {
205 205
 					set_transient( self::status_transient_key, $license_data, DAY_IN_SECONDS );
206 206
 				}
207 207
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 			$class   = 'hide';
230 230
 			$message = '';
231 231
 		} else {
232
-			if( ! empty( $license_data->error ) ) {
232
+			if ( ! empty( $license_data->error ) ) {
233 233
 				$class = 'error';
234 234
 				$string_key = $license_data->error;
235 235
 			} else { $class = $license_data->license;
@@ -253,12 +253,12 @@  discard block
 block discarded – undo
253 253
 	 */
254 254
 	public function license_details( $response = array() ) {
255 255
 
256
-		$response = (array) $response;
256
+		$response = (array)$response;
257 257
 
258 258
 		$return  = '';
259 259
 		$wrapper = '<span class="gv-license-details" aria-live="polite" aria-busy="false">%s</span>';
260 260
 
261
-		if ( ! empty( $response['license_key'] ) ) {
261
+		if ( ! empty( $response[ 'license_key' ] ) ) {
262 262
 			$return .= '<h3>' . rtrim( esc_html__( 'License Details:', 'gravityview' ), ':' ) . '</h3>';
263 263
 
264 264
 			if ( in_array( Utils::get( $response, 'license' ), array( 'invalid', 'deactivated' ) ) ) {
@@ -267,8 +267,8 @@  discard block
 block discarded – undo
267 267
 				}
268 268
 
269 269
 
270
-				$return .= $this->strings( $response['license'], $response );
271
-			} elseif ( ! empty( $response['license_name'] ) ) {
270
+				$return .= $this->strings( $response[ 'license' ], $response );
271
+			} elseif ( ! empty( $response[ 'license_name' ] ) ) {
272 272
 				$response_keys = array(
273 273
 					'license_name'   => '',
274 274
 					'license_limit'  => '',
@@ -283,22 +283,22 @@  discard block
 block discarded – undo
283 283
 				$response = wp_parse_args( $response, $response_keys );
284 284
 
285 285
 				$login_link_class = gravityview()->plugin->is_GF_25() ? 'button button-outline outline' : 'text-link';
286
-				$renews_on = ( 'lifetime' === $response['expires'] ) ? '' : sprintf( esc_html__( 'Renew on: %s', 'gravityview' ), date_i18n( get_option( 'date_format' ), strtotime( $response['expires'] ) - DAY_IN_SECONDS ) );
287
-				$login_link       = sprintf( '<a href="%s" class="gv-access-account ' . $login_link_class . '" rel="external">%s</a>', esc_url( sprintf( 'https://gravityview.co/wp-login.php?username=%s', $response['customer_email'] ) ), esc_html__( 'Access your GravityView account', 'gravityview' ) );
288
-				$local_text       = ( ! empty( $response['is_local'] ) ? '<span class="howto">' . __( 'This development site does not count toward license activation limits', 'gravityview' ) . '</span>' : '' );
289
-				$license_limit    = empty( $response['license_limit'] ) ? __( 'Unlimited', 'gravityview' ) : (int) $response['license_limit'];
286
+				$renews_on = ( 'lifetime' === $response[ 'expires' ] ) ? '' : sprintf( esc_html__( 'Renew on: %s', 'gravityview' ), date_i18n( get_option( 'date_format' ), strtotime( $response[ 'expires' ] ) - DAY_IN_SECONDS ) );
287
+				$login_link       = sprintf( '<a href="%s" class="gv-access-account ' . $login_link_class . '" rel="external">%s</a>', esc_url( sprintf( 'https://gravityview.co/wp-login.php?username=%s', $response[ 'customer_email' ] ) ), esc_html__( 'Access your GravityView account', 'gravityview' ) );
288
+				$local_text       = ( ! empty( $response[ 'is_local' ] ) ? '<span class="howto">' . __( 'This development site does not count toward license activation limits', 'gravityview' ) . '</span>' : '' );
289
+				$license_limit    = empty( $response[ 'license_limit' ] ) ? __( 'Unlimited', 'gravityview' ) : (int)$response[ 'license_limit' ];
290 290
 
291 291
 
292 292
 				$details = array(
293
-					'license'     => sprintf( esc_html__( 'License level: %s', 'gravityview' ), '<span class="gv-license-detail">' . esc_html( $response['license_name'] ) . '</span>' ),
294
-					'licensed_to' => sprintf( esc_html_x( 'Licensed to: %1$s (%2$s)', '1: Customer name; 2: Customer email', 'gravityview' ), '<span class="gv-license-detail">' . esc_html__( $response['customer_name'], 'gravityview' ), esc_html__( $response['customer_email'], 'gravityview' ) ) . '</span>' . $renews_on . $login_link,
295
-					'activations' => sprintf( str_replace( '%d', '%s', esc_html__( 'Activations: %d of %s sites', 'gravityview' ) ), '<span class="gv-license-detail">' . intval( $response['site_count'] ), esc_html( $license_limit ) ) . '</span>' . $local_text,
296
-					'upgrade'     => $this->get_upgrade_html( $response['upgrades'] ),
293
+					'license'     => sprintf( esc_html__( 'License level: %s', 'gravityview' ), '<span class="gv-license-detail">' . esc_html( $response[ 'license_name' ] ) . '</span>' ),
294
+					'licensed_to' => sprintf( esc_html_x( 'Licensed to: %1$s (%2$s)', '1: Customer name; 2: Customer email', 'gravityview' ), '<span class="gv-license-detail">' . esc_html__( $response[ 'customer_name' ], 'gravityview' ), esc_html__( $response[ 'customer_email' ], 'gravityview' ) ) . '</span>' . $renews_on . $login_link,
295
+					'activations' => sprintf( str_replace( '%d', '%s', esc_html__( 'Activations: %d of %s sites', 'gravityview' ) ), '<span class="gv-license-detail">' . intval( $response[ 'site_count' ] ), esc_html( $license_limit ) ) . '</span>' . $local_text,
296
+					'upgrade'     => $this->get_upgrade_html( $response[ 'upgrades' ] ),
297 297
 				);
298 298
 
299
-				if ( ! empty( $response['error'] ) && 'expired' === $response['error'] ) {
300
-					unset( $details['upgrade'] );
301
-					$details['licensed_to'] .= '<div class="error inline"><p>' . $this->strings( 'expired', $response ) . '</p></div>';
299
+				if ( ! empty( $response[ 'error' ] ) && 'expired' === $response[ 'error' ] ) {
300
+					unset( $details[ 'upgrade' ] );
301
+					$details[ 'licensed_to' ] .= '<div class="error inline"><p>' . $this->strings( 'expired', $response ) . '</p></div>';
302 302
 				}
303 303
 
304 304
 				$return .= '<ul>';
@@ -330,20 +330,20 @@  discard block
 block discarded – undo
330 330
 		if ( ! empty( $upgrades ) ) {
331 331
 
332 332
 			$locale_parts = explode( '_', get_locale() );
333
-			$is_english = ( 'en' === $locale_parts[0] );
333
+			$is_english = ( 'en' === $locale_parts[ 0 ] );
334 334
 
335 335
 			$output .= '<h4>' . esc_html__( 'Upgrades available:', 'gravityview' ) . '</h4>';
336 336
 			$output .= '<ul>';
337 337
 
338 338
 			foreach ( $upgrades as $upgrade_id => $upgrade ) {
339
-				$upgrade = (object) $upgrade;
339
+				$upgrade = (object)$upgrade;
340 340
 
341 341
 				$anchor_text = sprintf( esc_html_x( 'Upgrade to %1$s for %2$s', '1: GravityView upgrade name, 2: Cost of upgrade', 'gravityview' ), esc_attr( $upgrade->name ), esc_attr( $upgrade->price ) );
342 342
 
343 343
 				if ( $is_english && isset( $upgrade->description ) ) {
344 344
 					$message = esc_html( $upgrade->description );
345 345
 				} else {
346
-					switch( $upgrade->price_id ) {
346
+					switch ( $upgrade->price_id ) {
347 347
 						// Interstellar
348 348
 						case 1:
349 349
 						default:
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 			'invalid_item_id' => esc_html__( 'This license key does not have access to this plugin.', 'gravityview' ),
423 423
 			'missing' => esc_html__( 'The license key entered is invalid.', 'gravityview' ), // Missing is "the license couldn't be found", not "you submitted an empty license"
424 424
 			'revoked' => esc_html__( 'This license key has been revoked.', 'gravityview' ),
425
-			'expired' => sprintf( esc_html__( 'This license key has expired. %sRenew your license on the GravityView website%s to receive updates and support.', 'gravityview' ), '<a href="'. esc_url( $this->get_license_renewal_url( $license_data ) ) .'">', '</a>' ),
425
+			'expired' => sprintf( esc_html__( 'This license key has expired. %sRenew your license on the GravityView website%s to receive updates and support.', 'gravityview' ), '<a href="' . esc_url( $this->get_license_renewal_url( $license_data ) ) . '">', '</a>' ),
426 426
 			'capability' => esc_html__( 'You don\'t have the ability to edit plugin settings.', 'gravityview' ),
427 427
 			'verifying_license' => esc_html__( 'Verifying license&hellip;', 'gravityview' ),
428 428
 			'activate_license' => esc_html__( 'Activate License', 'gravityview' ),
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 
451 451
 		if ( ! empty( $license_data->renewal_url ) ) {
452 452
 			$renew_license_url = $license_data->renewal_url;
453
-		} elseif( ! empty( $license_data->license_key ) ) {
453
+		} elseif ( ! empty( $license_data->license_key ) ) {
454 454
 			$renew_license_url = sprintf( 'https://gravityview.co/checkout/?download_id=17&edd_license_key=%s', $license_data->license_key );
455 455
 		} else {
456 456
 			$renew_license_url = 'https://gravityview.co/account/';
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
 	 * @return array|\WP_Error
468 468
 	 */
469 469
 	private function _license_get_remote_response( $data, $license = '' ) {
470
-		$api_params = $this->_get_edd_settings( $data['edd_action'], $license );
470
+		$api_params = $this->_get_edd_settings( $data[ 'edd_action' ], $license );
471 471
 
472 472
 		$url = add_query_arg( $api_params, self::url );
473 473
 
@@ -507,9 +507,9 @@  discard block
 block discarded – undo
507 507
 	private function license_call_update_settings( $license_data, $data ) {
508 508
 		$settings = array();
509 509
 
510
-        $settings['license_key'] = $license_data->license_key = trim( $data['license'] );
511
-		$settings['license_key_status'] = $license_data->license;
512
-		$settings['license_key_response'] = (array)$license_data;
510
+        $settings[ 'license_key' ] = $license_data->license_key = trim( $data[ 'license' ] );
511
+		$settings[ 'license_key_status' ] = $license_data->license;
512
+		$settings[ 'license_key_response' ] = (array)$license_data;
513 513
 
514 514
 		$this->settings->set( $settings );
515 515
 	}
@@ -529,9 +529,9 @@  discard block
 block discarded – undo
529 529
 		$status = trim( $this->settings->get( 'license_key_status' ) );
530 530
 		$key = trim( $this->settings->get( 'license_key' ) );
531 531
 
532
-		if (  !empty( $key ) ) {
532
+		if ( ! empty( $key ) ) {
533 533
 			$response = $this->settings->get( 'license_key_response' );
534
-			$response = is_array( $response ) ? (object) $response : json_decode( $response );
534
+			$response = is_array( $response ) ? (object)$response : json_decode( $response );
535 535
 		} else {
536 536
 			$response = array();
537 537
 		}
@@ -574,11 +574,11 @@  discard block
 block discarded – undo
574 574
 
575 575
 		$submit = '<div class="gv-edd-button-wrapper">';
576 576
 		foreach ( $fields as $field ) {
577
-			$field['type'] = 'button';
578
-			$field['class'] = isset( $field['class'] ) ? $field['class'] . ' '. $class : $class;
579
-			$field['style'] = 'margin-left: 10px;';
580
-			if( $disabled_attribute ) {
581
-				$field['disabled'] = $disabled_attribute;
577
+			$field[ 'type' ] = 'button';
578
+			$field[ 'class' ] = isset( $field[ 'class' ] ) ? $field[ 'class' ] . ' ' . $class : $class;
579
+			$field[ 'style' ] = 'margin-left: 10px;';
580
+			if ( $disabled_attribute ) {
581
+				$field[ 'disabled' ] = $disabled_attribute;
582 582
 			}
583 583
 			$submit .= $this->settings->as_html( $field, $echo );
584 584
 		}
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
 				    'url'        => home_url(),
658 658
 				    'site_data'  => $this->get_site_data(),
659 659
 			    ),
660
-			));
660
+			) );
661 661
 
662 662
 			// make sure the response came back okay
663 663
 			if ( is_wp_error( $response ) ) {
@@ -687,45 +687,45 @@  discard block
 block discarded – undo
687 687
 		$theme_data = wp_get_theme();
688 688
 		$theme      = $theme_data->Name . ' ' . $theme_data->Version;
689 689
 
690
-		$data['gv_version']  = Plugin::$version;
691
-		$data['php_version']  = phpversion();
692
-		$data['wp_version']   = get_bloginfo( 'version' );
693
-		$data['gf_version']  = \GFForms::$version;
694
-		$data['server']       = Utils::get( $_SERVER, 'SERVER_SOFTWARE' );
695
-		$data['multisite']    = is_multisite();
696
-		$data['theme']        = $theme;
697
-		$data['url']          = home_url();
698
-		$data['license_key']  = $this->settings->get( 'license_key' );
699
-		$data['beta']         = $this->settings->get( 'beta' );
690
+		$data[ 'gv_version' ]  = Plugin::$version;
691
+		$data[ 'php_version' ]  = phpversion();
692
+		$data[ 'wp_version' ]   = get_bloginfo( 'version' );
693
+		$data[ 'gf_version' ]  = \GFForms::$version;
694
+		$data[ 'server' ]       = Utils::get( $_SERVER, 'SERVER_SOFTWARE' );
695
+		$data[ 'multisite' ]    = is_multisite();
696
+		$data[ 'theme' ]        = $theme;
697
+		$data[ 'url' ]          = home_url();
698
+		$data[ 'license_key' ]  = $this->settings->get( 'license_key' );
699
+		$data[ 'beta' ]         = $this->settings->get( 'beta' );
700 700
 
701 701
 		// View Data
702 702
 		$gravityview_posts = wp_count_posts( 'gravityview', 'readable' );
703 703
 
704
-		$data['view_count'] = null;
705
-		$data['view_first'] = null;
706
-		$data['view_latest'] = null;
704
+		$data[ 'view_count' ] = null;
705
+		$data[ 'view_first' ] = null;
706
+		$data[ 'view_latest' ] = null;
707 707
 
708 708
 		if ( $gravityview_posts->publish ) {
709
-			$data['view_count'] = $gravityview_posts->publish;
709
+			$data[ 'view_count' ] = $gravityview_posts->publish;
710 710
 
711 711
 			$first = get_posts( 'numberposts=1&post_type=gravityview&post_status=publish&order=ASC' );
712 712
 			$latest = get_posts( 'numberposts=1&post_type=gravityview&post_status=publish&order=DESC' );
713 713
 
714 714
 			if ( $first = array_shift( $first ) ) {
715
-				$data['view_first'] = $first->post_date;
715
+				$data[ 'view_first' ] = $first->post_date;
716 716
 			}
717 717
 			if ( $latest = array_pop( $latest ) ) {
718
-				$data['view_latest'] = $latest->post_date;
718
+				$data[ 'view_latest' ] = $latest->post_date;
719 719
 			}
720 720
 		}
721 721
 
722 722
 		// Form counts
723 723
 		if ( class_exists( 'GFFormsModel' ) ) {
724 724
 			$form_data = \GFFormsModel::get_form_count();
725
-			$data['forms_total'] = Utils::get( $form_data, 'total', 0 );
726
-			$data['forms_active'] = Utils::get( $form_data, 'active', 0 );
727
-			$data['forms_inactive'] = Utils::get( $form_data, 'inactive', 0 );
728
-			$data['forms_trash'] = Utils::get( $form_data, 'inactive', 0 );
725
+			$data[ 'forms_total' ] = Utils::get( $form_data, 'total', 0 );
726
+			$data[ 'forms_active' ] = Utils::get( $form_data, 'active', 0 );
727
+			$data[ 'forms_inactive' ] = Utils::get( $form_data, 'inactive', 0 );
728
+			$data[ 'forms_trash' ] = Utils::get( $form_data, 'inactive', 0 );
729 729
 		}
730 730
 
731 731
 		// Retrieve current plugin information
@@ -733,13 +733,13 @@  discard block
 block discarded – undo
733 733
 			include ABSPATH . '/wp-admin/includes/plugin.php';
734 734
 		}
735 735
 
736
-		$data['integrations']     = self::get_related_plugins_and_extensions();
737
-		$data['active_plugins']   = get_option( 'active_plugins', array() );
738
-		$data['inactive_plugins'] = array();
739
-		$data['locale']           = get_locale();
736
+		$data[ 'integrations' ]     = self::get_related_plugins_and_extensions();
737
+		$data[ 'active_plugins' ]   = get_option( 'active_plugins', array() );
738
+		$data[ 'inactive_plugins' ] = array();
739
+		$data[ 'locale' ]           = get_locale();
740 740
 
741 741
 		// Validate request on the GV server
742
-		$data['hash']             = 'gv_version.url.locale:' . sha1( $data['gv_version'] . $data['url'] . $data['locale'] );
742
+		$data[ 'hash' ]             = 'gv_version.url.locale:' . sha1( $data[ 'gv_version' ] . $data[ 'url' ] . $data[ 'locale' ] );
743 743
 
744 744
 		return $data;
745 745
 	}
@@ -769,7 +769,7 @@  discard block
 block discarded – undo
769 769
 
770 770
 				$plugin_data = get_plugin_data( $active_plugin );
771 771
 
772
-				$extensions[] = sprintf( '%s %s', $plugin_data['Name'], $plugin_data['Version'] );
772
+				$extensions[ ] = sprintf( '%s %s', $plugin_data[ 'Name' ], $plugin_data[ 'Version' ] );
773 773
 			}
774 774
 
775 775
 			if ( ! empty( $extensions ) ) {
Please login to merge, or discard this patch.
future/includes/class-gv-context-template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,8 +86,8 @@
 block discarded – undo
86 86
 		 */
87 87
 		$context->view = Utils::get( $template, 'view' );
88 88
 		$context->source = Utils::get( $template, 'source' );
89
-		$context->field = Utils::get( $template, 'field' ) ? : Utils::get( $data, 'field' );
90
-		$context->entry = Utils::get( $template, 'entry' ) ? : Utils::get( $data, 'entry' );
89
+		$context->field = Utils::get( $template, 'field' ) ?: Utils::get( $data, 'field' );
90
+		$context->entry = Utils::get( $template, 'entry' ) ?: Utils::get( $data, 'entry' );
91 91
 		$context->request = Utils::get( $template, 'request' );
92 92
 
93 93
 		$context->entries = Utils::get( $template, 'entries' ) ? $template->entries : null;
Please login to merge, or discard this patch.
future/includes/class-gv-logger-wp-action.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
 	 */
28 28
 	protected function log( $level, $message, $context ) {
29 29
 
30
-		$php_version = ( ! empty( $GLOBALS['GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE'] ) ) ?
31
-			$GLOBALS['GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE'] : phpversion();
30
+		$php_version = ( ! empty( $GLOBALS[ 'GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE' ] ) ) ?
31
+			$GLOBALS[ 'GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE' ] : phpversion();
32 32
 
33 33
 		if ( version_compare( $php_version, '5.4', '>=' ) ) {
34 34
 			$backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 3 );
35
-			$location = $this->interpolate( "{class}{type}{function}", $backtrace[2] );
35
+			$location = $this->interpolate( "{class}{type}{function}", $backtrace[ 2 ] );
36 36
 			$message = $this->interpolate( "[$level, $location] $message", $context );
37 37
 		} else {
38 38
 			$message = "[$level] $message";
@@ -58,14 +58,14 @@  discard block
 block discarded – undo
58 58
 			do_action(
59 59
 				sprintf( 'gravityview_log_%s_test', $action ),
60 60
 				$this->interpolate( $message, $context ),
61
-				empty( $context['data'] ) ? array() : $context['data']
61
+				empty( $context[ 'data' ] ) ? array() : $context[ 'data' ]
62 62
 			);
63 63
 		}
64 64
 		
65 65
 		do_action(
66 66
 			sprintf( 'gravityview_log_%s', $action ),
67 67
 			$this->interpolate( $message, $context ),
68
-			empty( $context['data'] ) ? array() : $context['data']
68
+			empty( $context[ 'data' ] ) ? array() : $context[ 'data' ]
69 69
 		);
70 70
 	}
71 71
 }
Please login to merge, or discard this patch.
gravityview.php 3 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -237,26 +237,26 @@
 block discarded – undo
237 237
 
238 238
 	/** DEBUG */
239 239
 
240
-    /**
241
-     * Logs messages using Gravity Forms logging add-on
242
-     * @param  string $message log message
243
-     * @param mixed $data Additional data to display
240
+	/**
241
+	 * Logs messages using Gravity Forms logging add-on
242
+	 * @param  string $message log message
243
+	 * @param mixed $data Additional data to display
244 244
 	 * @deprecated use gravityview()->log
245
-     * @return void
246
-     */
247
-    public static function log_debug( $message, $data = null ){
245
+	 * @return void
246
+	 */
247
+	public static function log_debug( $message, $data = null ){
248 248
 		gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
249 249
 		gravityview()->log->debug( $message, $data );
250
-    }
250
+	}
251 251
 
252
-    /**
253
-     * Logs messages using Gravity Forms logging add-on
254
-     * @param  string $message log message
252
+	/**
253
+	 * Logs messages using Gravity Forms logging add-on
254
+	 * @param  string $message log message
255 255
 	 * @deprecated use gravityview()->log
256
-     * @return void
257
-     */
258
-    public static function log_error( $message, $data = null ){
256
+	 * @return void
257
+	 */
258
+	public static function log_error( $message, $data = null ){
259 259
 		gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
260 260
 		gravityview()->log->error( $message, $data );
261
-    }
261
+	}
262 262
 } // end class GravityView_Plugin
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 	 * @deprecated use gravityview()->log
245 245
      * @return void
246 246
      */
247
-    public static function log_debug( $message, $data = null ){
247
+    public static function log_debug( $message, $data = null ) {
248 248
 		gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
249 249
 		gravityview()->log->debug( $message, $data );
250 250
     }
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 	 * @deprecated use gravityview()->log
256 256
      * @return void
257 257
      */
258
-    public static function log_error( $message, $data = null ){
258
+    public static function log_error( $message, $data = null ) {
259 259
 		gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
260 260
 		gravityview()->log->error( $message, $data );
261 261
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 	 * @deprecated use gravityview()->log
245 245
      * @return void
246 246
      */
247
-    public static function log_debug( $message, $data = null ){
247
+    public static function log_debug( $message, $data = null ) {
248 248
 		gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
249 249
 		gravityview()->log->debug( $message, $data );
250 250
     }
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 	 * @deprecated use gravityview()->log
256 256
      * @return void
257 257
      */
258
-    public static function log_error( $message, $data = null ){
258
+    public static function log_error( $message, $data = null ) {
259 259
 		gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' );
260 260
 		gravityview()->log->error( $message, $data );
261 261
     }
Please login to merge, or discard this patch.