Completed
Pull Request — master (#836)
by Zack
18:24
created
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.
includes/fields/class-gravityview-field-total.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 	 *
51 51
 	 * @return array Blacklist, with "total" added. If not edit context, original field blacklist. Otherwise, blacklist including total.
52 52
 	 */
53
-	public function add_to_blacklist( $blacklist = array(), $context = NULL  ){
53
+	public function add_to_blacklist( $blacklist = array(), $context = NULL  ) {
54 54
 
55 55
 		if( empty( $context ) || $context !== 'edit' ) {
56 56
 			return $blacklist;
Please login to merge, or discard this patch.