Completed
Pull Request — master (#836)
by Zack
08:51 queued 05:03
created
future/includes/class-gv-core.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,8 +2,9 @@  discard block
 block discarded – undo
2 2
 namespace GV;
3 3
 
4 4
 /** If this file is called directly, abort. */
5
-if ( ! defined( 'GRAVITYVIEW_DIR' ) )
5
+if ( ! defined( 'GRAVITYVIEW_DIR' ) ) {
6 6
 	die();
7
+}
7 8
 
8 9
 /**
9 10
  * The core GravityView API.
@@ -45,8 +46,9 @@  discard block
 block discarded – undo
45 46
 	 * @return \GV\Core The global instance of GravityView Core.
46 47
 	 */
47 48
 	public static function get() {
48
-		if ( ! self::$__instance instanceof self )
49
-			self::$__instance = new self;
49
+		if ( ! self::$__instance instanceof self ) {
50
+					self::$__instance = new self;
51
+		}
50 52
 		return self::$__instance;
51 53
 	}
52 54
 
Please login to merge, or discard this patch.
future/includes/class-gv-entry.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,8 +2,9 @@  discard block
 block discarded – undo
2 2
 namespace GV;
3 3
 
4 4
 /** If this file is called directly, abort. */
5
-if ( ! defined( 'GRAVITYVIEW_DIR' ) )
5
+if ( ! defined( 'GRAVITYVIEW_DIR' ) ) {
6 6
 	die();
7
+}
7 8
 
8 9
 /**
9 10
  * The base Entry class.
@@ -24,8 +25,9 @@  discard block
 block discarded – undo
24 25
 		$endpoint = self::get_endpoint_name();
25 26
 
26 27
 		/** Let's make sure the endpoint array is not polluted. */
27
-		if ( in_array( array( EP_ALL, $endpoint, $endpoint ), $wp_rewrite->endpoints ) )
28
-			return;
28
+		if ( in_array( array( EP_ALL, $endpoint, $endpoint ), $wp_rewrite->endpoints ) ) {
29
+					return;
30
+		}
29 31
 
30 32
 		add_rewrite_endpoint( $endpoint, EP_ALL );
31 33
 	}
Please login to merge, or discard this patch.
future/includes/class-gv-view.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,8 +2,9 @@  discard block
 block discarded – undo
2 2
 namespace GV;
3 3
 
4 4
 /** If this file is called directly, abort. */
5
-if ( ! defined( 'GRAVITYVIEW_DIR' ) )
5
+if ( ! defined( 'GRAVITYVIEW_DIR' ) ) {
6 6
 	die();
7
+}
7 8
 
8 9
 /**
9 10
  * The default GravityView View class.
@@ -21,8 +22,9 @@  discard block
 block discarded – undo
21 22
 	public static function register_post_type() {
22 23
 
23 24
 		/** Register only once */
24
-		if ( post_type_exists( 'gravityview' ) )
25
-			return;
25
+		if ( post_type_exists( 'gravityview' ) ) {
26
+					return;
27
+		}
26 28
 
27 29
 		/**
28 30
 		 * @filter `gravityview_is_hierarchical` Make GravityView Views hierarchical by returning TRUE
Please login to merge, or discard this patch.
future/includes/class-gv-request.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,9 @@
 block discarded – undo
2 2
 namespace GV;
3 3
 
4 4
 /** If this file is called directly, abort. */
5
-if ( ! defined( 'GRAVITYVIEW_DIR' ) )
5
+if ( ! defined( 'GRAVITYVIEW_DIR' ) ) {
6 6
 	die();
7
+}
7 8
 
8 9
 /**
9 10
  * The Request abstract class.
Please login to merge, or discard this patch.
future/includes/class-gv-shortcode.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,9 @@
 block discarded – undo
2 2
 namespace GV;
3 3
 
4 4
 /** If this file is called directly, abort. */
5
-if ( ! defined( 'GRAVITYVIEW_DIR' ) )
5
+if ( ! defined( 'GRAVITYVIEW_DIR' ) ) {
6 6
 	die();
7
+}
7 8
 
8 9
 /**
9 10
  * The base \GV\Shortcode class.
Please login to merge, or discard this patch.
future/includes/class-gv-shortcode-gravityview.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,9 @@
 block discarded – undo
2 2
 namespace GV\Shortcodes;
3 3
 
4 4
 /** If this file is called directly, abort. */
5
-if ( ! defined( 'GRAVITYVIEW_DIR' ) )
5
+if ( ! defined( 'GRAVITYVIEW_DIR' ) ) {
6 6
 	die();
7
+}
7 8
 
8 9
 /**
9 10
  * The base \GV\Shortcode class.
Please login to merge, or discard this patch.
includes/class-frontend-views.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 			 */
245 245
 			$this->context_view_id = $_GET['gvid'];
246 246
 
247
-		} elseif ( ! $this->getGvOutputData()->has_multiple_views() )  {
247
+		} elseif ( ! $this->getGvOutputData()->has_multiple_views() ) {
248 248
 			$array_keys = array_keys( $this->getGvOutputData()->get_views() );
249 249
 			$this->context_view_id = array_pop( $array_keys );
250 250
 			unset( $array_keys );
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
 		}
453 453
 
454 454
 		// User reported WooCommerce doesn't pass two args.
455
-		if ( empty( $passed_post_id ) )  {
455
+		if ( empty( $passed_post_id ) ) {
456 456
 			return $title;
457 457
 		}
458 458
 
@@ -1307,7 +1307,7 @@  discard block
 block discarded – undo
1307 1307
 					 */
1308 1308
 					$address_part = apply_filters( 'gravityview/sorting/address', 'city', $sort_field_id, $form_id );
1309 1309
 
1310
-					switch( strtolower( $address_part ) ){
1310
+					switch( strtolower( $address_part ) ) {
1311 1311
 						case 'street':
1312 1312
 							$sort_field_id .= '.1';
1313 1313
 							break;
@@ -1392,7 +1392,7 @@  discard block
 block discarded – undo
1392 1392
 		 */
1393 1393
 		$single_entry = apply_filters( 'gravityview/is_single_entry', $single_entry );
1394 1394
 
1395
-		if ( empty( $single_entry ) ){
1395
+		if ( empty( $single_entry ) ) {
1396 1396
 			return false;
1397 1397
 		} else {
1398 1398
 			return $single_entry;
Please login to merge, or discard this patch.
gravityview.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -312,8 +312,9 @@  discard block
 block discarded – undo
312 312
 	 */
313 313
 	public static function is_admin() {
314 314
 
315
-		if ( function_exists( 'gravityview' ) )
316
-			return gravityview()->request->is_admin();
315
+		if ( function_exists( 'gravityview' ) ) {
316
+					return gravityview()->request->is_admin();
317
+		}
317 318
 
318 319
 		$doing_ajax = defined( 'DOING_AJAX' ) ? DOING_AJAX : false;
319 320
 
@@ -382,7 +383,7 @@  discard block
 block discarded – undo
382 383
      * @param mixed $data Additional data to display
383 384
      * @return void
384 385
      */
385
-    public static function log_debug( $message, $data = null ){
386
+    public static function log_debug( $message, $data = null ) {
386 387
 	    /**
387 388
 	     * @action `gravityview_log_debug` Log a debug message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output
388 389
 	     * @param string $message Message to display
@@ -396,7 +397,7 @@  discard block
 block discarded – undo
396 397
      * @param  string $message log message
397 398
      * @return void
398 399
      */
399
-    public static function log_error( $message, $data = null ){
400
+    public static function log_error( $message, $data = null ) {
400 401
 	    /**
401 402
 	     * @action `gravityview_log_error` Log an error message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output
402 403
 	     * @param string $message Error message to display
Please login to merge, or discard this patch.
future/gravityview.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,11 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /** If this file is called directly, abort. */
3
-if ( ! defined( 'GRAVITYVIEW_DIR' ) )
3
+if ( ! defined( 'GRAVITYVIEW_DIR' ) ) {
4 4
 	die();
5
+}
5 6
 
6 7
 /** The future branch of GravityView requires PHP 5.3+ namespaces and SPL. */
7
-if ( version_compare( phpversion(), '5.3' , '<' ) )
8
+if ( version_compare( phpversion(), '5.3' , '<' ) ) {
8 9
 	return false;
10
+}
9 11
 
10 12
 /** @define "GRAVITYVIEW_DIR" "../" Require core */
11 13
 require GRAVITYVIEW_DIR . 'future/includes/class-gv-core.php';
Please login to merge, or discard this patch.