Completed
Pull Request — develop (#843)
by Zack
05:39
created
future/includes/class-gv-plugin.php 1 patch
Braces   +11 added lines, -7 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 GravityView WordPress plugin class.
@@ -68,8 +69,9 @@  discard block
 block discarded – undo
68 69
 	 * @return \GV\Plugin The global instance of GravityView Plugin.
69 70
 	 */
70 71
 	public static function get() {
71
-		if ( ! self::$__instance instanceof self )
72
-			self::$__instance = new self;
72
+		if ( ! self::$__instance instanceof self ) {
73
+					self::$__instance = new self;
74
+		}
73 75
 		return self::$__instance;
74 76
 	}
75 77
 
@@ -92,8 +94,9 @@  discard block
 block discarded – undo
92 94
 		 * Stop all further functionality from loading if the WordPress
93 95
 		 * plugin is incompatible with the current environment.
94 96
 		 */
95
-		if ( ! $this->is_compatible() )
96
-			return;
97
+		if ( ! $this->is_compatible() ) {
98
+					return;
99
+		}
97 100
 
98 101
 		/** Register hooks that are fired when the plugin is activated and deactivated. */
99 102
 		register_activation_hook( $this->dir( 'gravityview.php' ), array( $this, 'activate' ) );
@@ -236,8 +239,9 @@  discard block
 block discarded – undo
236 239
 	 * @return string The version of Gravity Forms.
237 240
 	 */
238 241
 	private function get_gravityforms_version() {
239
-		if ( !class_exists( '\GFCommon' ) || !empty( $GLOBALS['GRAVITYVIEW_TESTS_GF_INACTIVE_OVERRIDE'] ) )
240
-			throw new \ErrorException( 'Gravity Forms is inactive or not installed.' );
242
+		if ( !class_exists( '\GFCommon' ) || !empty( $GLOBALS['GRAVITYVIEW_TESTS_GF_INACTIVE_OVERRIDE'] ) ) {
243
+					throw new \ErrorException( 'Gravity Forms is inactive or not installed.' );
244
+		}
241 245
 
242 246
 		return !empty( $GLOBALS['GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE'] ) ?
243 247
 			$GLOBALS['GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE'] : \GFCommon::$version;
Please login to merge, or discard this patch.
future/includes/class-gv-collection.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
  * A generic Collection base class.
Please login to merge, or discard this patch.
future/includes/class-gv-request-frontend.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 default Request class.
Please login to merge, or discard this patch.
includes/class-data.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 						/** Deprecated, see \GV\View_Collection::from_post */
82 82
 						if( ( get_post_type( $post ) === 'gravityview' ) ) {
83 83
 							$ids[] = $post->ID;
84
-						} else{
84
+						} else {
85 85
 							// Parse the Post Content
86 86
 							$id = $this->parse_post_content( $post->post_content );
87 87
 							if( $id ) {
@@ -105,8 +105,9 @@  discard block
 block discarded – undo
105 105
 					if ( function_exists( 'gravityview' ) ) {
106 106
 						$shortcodes = \GV\Shortcode::parse( $passed_post );
107 107
 						foreach ( $shortcodes as $shortcode ) {
108
-							if ( $shortcode->name == 'gravityview' && !empty( $shortcode->atts['id'] ) )
109
-								$ids []= $shortcode->atts['id'];
108
+							if ( $shortcode->name == 'gravityview' && !empty( $shortcode->atts['id'] ) ) {
109
+															$ids []= $shortcode->atts['id'];
110
+							}
110 111
 						}
111 112
 					} else {
112 113
 						/** Deprecated, use \GV\Shortcode::parse. */
@@ -507,7 +508,7 @@  discard block
 block discarded – undo
507 508
 		}
508 509
 
509 510
 		if( ! $message ) {
510
-			if ( function_exists( 'gravityview' ) && $post = get_post( $post_id ) )  {
511
+			if ( function_exists( 'gravityview' ) && $post = get_post( $post_id ) ) {
511 512
 				$views = GV\View_Collection::from_post( $post );
512 513
 				$view_ids_in_post = array_map( function( $view ) { return $view->ID; }, $views->all() );
513 514
 			} else {
Please login to merge, or discard this patch.
includes/class-oembed.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -231,8 +231,9 @@
 block discarded – undo
231 231
 			if ( function_exists( 'gravityview' ) && $post = get_post( $post_id ) ) {
232 232
 				$views = \GV\View_Collection::from_post( $post );
233 233
 				$views = $views->all();
234
-				if ( ! empty( $views ) )
235
-					$this->view_id = $views[0]->ID;
234
+				if ( ! empty( $views ) ) {
235
+									$this->view_id = $views[0]->ID;
236
+				}
236 237
 			} else {
237 238
 				/** Deprecated. */
238 239
 				$this->view_id = GravityView_View_Data::getInstance()->maybe_get_view_id( $post_id );
Please login to merge, or discard this patch.