Passed
Push — master ( 2434f2...f94701 )
by Nirjhar
08:29
created
lib/cron.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	exit;
4
+}
3 5
 
4 6
 /**
5 7
  * Add Cron schedules and cron task callback
Please login to merge, or discard this patch.
lib/ajax.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,9 @@
 block discarded – undo
7 7
  * @version    1.2.1
8 8
  * @package    wp-plugin-framework
9 9
  */
10
-if ( ! defined( 'ABSPATH' ) ) exit;
10
+if ( ! defined( 'ABSPATH' ) ) {
11
+	exit;
12
+}
11 13
 
12 14
 //AJAX helper class
13 15
 if ( ! class_exists( 'PLUGIN_AJAX' ) ) {
Please login to merge, or discard this patch.
lib/script.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,9 @@
 block discarded – undo
6 6
  * @version    1.2.1
7 7
  * @package    wp-plugin-framework
8 8
  */
9
-if ( ! defined( 'ABSPATH' ) ) exit;
9
+if ( ! defined( 'ABSPATH' ) ) {
10
+	exit;
11
+}
10 12
 
11 13
 if ( ! class_exists( 'PLUGIN_SCRIPT' ) ) {
12 14
 
Please login to merge, or discard this patch.
src/settings.php 1 patch
Braces   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	exit;
4
+}
3 5
 
4 6
 /**
5 7
  * Backend settings page class, can have settings fields or data table
@@ -164,7 +166,10 @@  discard block
 block discarded – undo
164 166
 					break;
165 167
 			}
166 168
 
167
-    		if ( $output ) return $output; // Related to PLUGIN_TABLE()
169
+    		if ( $output ) {
170
+    			return $output;
171
+    		}
172
+    		// Related to PLUGIN_TABLE()
168 173
 		}
169 174
 
170 175
 
Please login to merge, or discard this patch.
src/metabox.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	exit;
4
+}
3 5
 
4 6
 /**
5 7
  * Build a sample metabox in editor screen
@@ -73,16 +75,22 @@  discard block
 block discarded – undo
73 75
 		function save( $post_id, $post ) {
74 76
 
75 77
 			//Check if doing autosave
76
-			if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;
78
+			if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
79
+				return;
80
+			}
77 81
 
78 82
 			//Verify the nonce before proceeding.
79
-			if ( !isset( $_POST['metabox_name_nonce'] ) || !wp_verify_nonce( $_POST['metabox_name_nonce'], basename( __FILE__ ) ) ) return;
83
+			if ( !isset( $_POST['metabox_name_nonce'] ) || !wp_verify_nonce( $_POST['metabox_name_nonce'], basename( __FILE__ ) ) ) {
84
+				return;
85
+			}
80 86
 
81 87
 			//Get the post type object.
82 88
 			$post_type = get_post_type_object( $post->post_type );
83 89
 
84 90
 			//Check if the current user has permission to edit the post.
85
-			if ( !current_user_can( $post_type->cap->edit_post, $post_id ) ) return $post_id;
91
+			if ( !current_user_can( $post_type->cap->edit_post, $post_id ) ) {
92
+				return $post_id;
93
+			}
86 94
 
87 95
 			if ( isset( $_POST['metabox_field_name'] ) ) {
88 96
 				update_post_meta( $post_id, 'metabox_field_name', sanitize_text_field($_POST['metabox_field_name']) );
Please login to merge, or discard this patch.