Passed
Push — master ( 93534b...206518 )
by Nirjhar
08:40
created
wp-plugin-framework.php 1 patch
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,9 @@  discard block
 block discarded – undo
11 11
  License: GPLv2
12 12
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
13 13
  */
14
-if ( !defined( 'ABSPATH' ) ) exit;
14
+if ( !defined( 'ABSPATH' ) ) {
15
+	exit;
16
+}
15 17
 
16 18
 
17 19
 //Define basic names
@@ -31,8 +33,10 @@  discard block
 block discarded – undo
31 33
 //The Plugin
32 34
 require_once( 'autoload.php' );
33 35
 function plugin() {
34
-	if ( class_exists( 'PLUGIN_BUILD' ) ) return PLUGIN_BUILD::instance();
35
-}
36
+	if ( class_exists( 'PLUGIN_BUILD' ) ) {
37
+		return PLUGIN_BUILD::instance();
38
+	}
39
+	}
36 40
 
37 41
 global $plugin;
38 42
 $plugin = plugin(); ?>
Please login to merge, or discard this patch.
lib/class-upload.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
  * Plugin upload for WordPress front end or backend
Please login to merge, or discard this patch.
lib/class-ajax.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
  * @author     Nirjhar Lo
7 7
  * @package    wp-plugin-framework
8 8
  */
9
-if ( ! defined( 'ABSPATH' ) ) exit;
9
+if ( ! defined( 'ABSPATH' ) ) {
10
+	exit;
11
+}
10 12
 
11 13
 //AJAX helper class
12 14
 if ( ! class_exists( 'PLUGIN_AJAX' ) ) {
Please login to merge, or discard this patch.
lib/class-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/class-script.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@
 block discarded – undo
5 5
  * @author     Nirjhar Lo
6 6
  * @package    wp-plugin-framework
7 7
  */
8
-if ( ! defined( 'ABSPATH' ) ) exit;
8
+if ( ! defined( 'ABSPATH' ) ) {
9
+	exit;
10
+}
9 11
 
10 12
 if ( ! class_exists( 'PLUGIN_SCRIPT' ) ) {
11 13
 
Please login to merge, or discard this patch.
src/class-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/class-query.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
  * WP Query class for querying WP database
Please login to merge, or discard this patch.
src/class-widget.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
  * Widget class
Please login to merge, or discard this patch.
src/class-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.