Completed
Pull Request — develop (#1226)
by Zack
18:31
created
future/includes/class-gv-plugin.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	/**
90 90
 	 * @var string The REST API functionality identifier.
91 91
 	 */
92
-	const FEATURE_REST  = 'rest_api';
92
+	const FEATURE_REST = 'rest_api';
93 93
 
94 94
 	/**
95 95
 	 * Get the global instance of \GV\Plugin.
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 		include_once $this->dir( 'includes/class-frontend-views.php' );
216 216
 		include_once $this->dir( 'includes/class-gravityview-admin-bar.php' );
217 217
 		include_once $this->dir( 'includes/class-gravityview-entry-list.php' );
218
-		include_once $this->dir( 'includes/class-gravityview-merge-tags.php'); /** @since 1.8.4 */
218
+		include_once $this->dir( 'includes/class-gravityview-merge-tags.php' ); /** @since 1.8.4 */
219 219
 		include_once $this->dir( 'includes/class-data.php' );
220 220
 		include_once $this->dir( 'includes/class-gravityview-shortcode.php' );
221 221
 		include_once $this->dir( 'includes/class-gravityview-entry-link-shortcode.php' );
@@ -269,11 +269,11 @@  discard block
 block discarded – undo
269 269
 
270 270
 		// Pre-4.6 loading
271 271
 		// TODO: Remove when GV minimum version is WordPress 4.6.0
272
-		$locale = apply_filters( 'plugin_locale', ( ( function_exists('get_user_locale') && is_admin() ) ? get_user_locale() : get_locale() ), 'gravityview' );
272
+		$locale = apply_filters( 'plugin_locale', ( ( function_exists( 'get_user_locale' ) && is_admin() ) ? get_user_locale() : get_locale() ), 'gravityview' );
273 273
 
274
-		$loaded = load_textdomain( 'gravityview', sprintf( '%s/%s-%s.mo', $this->dir('languages'), $domain, $locale ) );
274
+		$loaded = load_textdomain( 'gravityview', sprintf( '%s/%s-%s.mo', $this->dir( 'languages' ), $domain, $locale ) );
275 275
 
276
-		if( $loaded ) {
276
+		if ( $loaded ) {
277 277
 			return;
278 278
 		}
279 279
 
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
 	 */
425 425
 	public function is_compatible_wordpress( $version = null ) {
426 426
 
427
-		if( ! $version ) {
427
+		if ( ! $version ) {
428 428
 			$version = self::$min_wp_version;
429 429
 		}
430 430
 
@@ -465,8 +465,8 @@  discard block
 block discarded – undo
465 465
 	 * @return string The version of PHP.
466 466
 	 */
467 467
 	private function get_php_version() {
468
-		return ! empty( $GLOBALS['GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE'] ) ?
469
-			$GLOBALS['GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE'] : phpversion();
468
+		return ! empty( $GLOBALS[ 'GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE' ] ) ?
469
+			$GLOBALS[ 'GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE' ] : phpversion();
470 470
 	}
471 471
 
472 472
 	/**
@@ -477,8 +477,8 @@  discard block
 block discarded – undo
477 477
 	 * @return string The version of WordPress.
478 478
 	 */
479 479
 	private function get_wordpress_version() {
480
-		return ! empty( $GLOBALS['GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE'] ) ?
481
-			$GLOBALS['GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE'] : $GLOBALS['wp_version'];
480
+		return ! empty( $GLOBALS[ 'GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE' ] ) ?
481
+			$GLOBALS[ 'GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE' ] : $GLOBALS[ 'wp_version' ];
482 482
 	}
483 483
 
484 484
 	/**
@@ -489,13 +489,13 @@  discard block
 block discarded – undo
489 489
 	 * @return string|null The version of Gravity Forms or null if inactive.
490 490
 	 */
491 491
 	private function get_gravityforms_version() {
492
-		if ( ! class_exists( '\GFCommon' ) || ! empty( $GLOBALS['GRAVITYVIEW_TESTS_GF_INACTIVE_OVERRIDE'] ) ) {
492
+		if ( ! class_exists( '\GFCommon' ) || ! empty( $GLOBALS[ 'GRAVITYVIEW_TESTS_GF_INACTIVE_OVERRIDE' ] ) ) {
493 493
 			gravityview()->log->error( 'Gravity Forms is inactive or not installed.' );
494 494
 			return null;
495 495
 		}
496 496
 
497
-		return ! empty( $GLOBALS['GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE'] ) ?
498
-			$GLOBALS['GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE'] : \GFCommon::$version;
497
+		return ! empty( $GLOBALS[ 'GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE' ] ) ?
498
+			$GLOBALS[ 'GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE' ] : \GFCommon::$version;
499 499
 	}
500 500
 
501 501
 	/**
@@ -552,9 +552,9 @@  discard block
 block discarded – undo
552 552
 		$tables = array();
553 553
 
554 554
 		if ( version_compare( \GravityView_GFFormsModel::get_database_version(), '2.3-dev-1', '>=' ) ) {
555
-			$tables []= \GFFormsModel::get_entry_meta_table_name();
555
+			$tables [ ] = \GFFormsModel::get_entry_meta_table_name();
556 556
 		}
557
-		$tables []= \GFFormsModel::get_lead_meta_table_name();
557
+		$tables [ ] = \GFFormsModel::get_lead_meta_table_name();
558 558
 
559 559
 		foreach ( $tables as $meta_table ) {
560 560
 			$sql = "
@@ -572,13 +572,13 @@  discard block
 block discarded – undo
572 572
 		$tables = array();
573 573
 
574 574
 		if ( version_compare( \GravityView_GFFormsModel::get_database_version(), '2.3-dev-1', '>=' ) && method_exists( 'GFFormsModel', 'get_entry_notes_table_name' ) ) {
575
-			$tables[] = \GFFormsModel::get_entry_notes_table_name();
575
+			$tables[ ] = \GFFormsModel::get_entry_notes_table_name();
576 576
 		}
577 577
 
578
-		$tables[] = \GFFormsModel::get_lead_notes_table_name();
578
+		$tables[ ] = \GFFormsModel::get_lead_notes_table_name();
579 579
 
580
-		$disapproved = __('Disapproved the Entry for GravityView', 'gravityview');
581
-		$approved = __('Approved the Entry for GravityView', 'gravityview');
580
+		$disapproved = __( 'Disapproved the Entry for GravityView', 'gravityview' );
581
+		$approved = __( 'Approved the Entry for GravityView', 'gravityview' );
582 582
 
583 583
 		$suppress = $wpdb->suppress_errors();
584 584
 		foreach ( $tables as $notes_table ) {
Please login to merge, or discard this patch.