Passed
Push — master ( be91ea...c28712 )
by Nirjhar
02:27
created
lib/ajax.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,9 @@
 block discarded – undo
3 3
  * Doing AJAX the WordPress way.
4 4
  * Use this class in admin or user side
5 5
  */
6
-if ( ! defined( 'ABSPATH' ) ) exit;
6
+if ( ! defined( 'ABSPATH' ) ) {
7
+	exit;
8
+}
7 9
 
8 10
 //AJAX helper class
9 11
 if ( ! class_exists( 'PLUGIN_AJAX' ) ) {
Please login to merge, or discard this patch.
lib/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/script.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,9 @@
 block discarded – undo
2 2
 /**
3 3
  * Add scripts to the plugin. CSS and JS.
4 4
  */
5
-if ( ! defined( 'ABSPATH' ) ) exit;
5
+if ( ! defined( 'ABSPATH' ) ) {
6
+	exit;
7
+}
6 8
 
7 9
 if ( ! class_exists( 'PLUGIN_SCRIPT' ) ) {
8 10
 
Please login to merge, or discard this patch.
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
  *
Please login to merge, or discard this patch.
src/db.php 1 patch
Braces   +9 added lines, -5 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
  * DB installation class
@@ -45,10 +47,12 @@  discard block
 block discarded – undo
45 47
 			$wpdb->hide_errors();
46 48
 			$collate = "";
47 49
 		    if ( $wpdb->has_cap( 'collation' ) ) {
48
-				if( ! empty($wpdb->charset ) )
49
-					$collate .= "DEFAULT CHARACTER SET $wpdb->charset";
50
-				if( ! empty($wpdb->collate ) )
51
-					$collate .= " COLLATE $wpdb->collate";
50
+				if( ! empty($wpdb->charset ) ) {
51
+									$collate .= "DEFAULT CHARACTER SET $wpdb->charset";
52
+				}
53
+				if( ! empty($wpdb->collate ) ) {
54
+									$collate .= " COLLATE $wpdb->collate";
55
+				}
52 56
 		    }
53 57
     		require_once( $this->up_path );
54 58
 			return $collate;
Please login to merge, or discard this patch.
src/shortcode.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
  * Shortcode class for rendering in front end
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
@@ -103,7 +105,10 @@  discard block
 block discarded – undo
103 105
 		//Set screen option
104 106
 		public function set_screen($status, $option, $value) {
105 107
  
106
-    		if ( 'option_name_per_page' == $option ) return $value; // Related to PLUGIN_TABLE()
108
+    		if ( 'option_name_per_page' == $option ) {
109
+    			return $value;
110
+    		}
111
+    		// Related to PLUGIN_TABLE()
107 112
     			//return $status; 
108 113
 		}
109 114
 
Please login to merge, or discard this patch.
src/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/metabox.php 1 patch
Braces   +9 added lines, -5 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
@@ -52,15 +54,17 @@  discard block
 block discarded – undo
52 54
 		function save( $post_id, $post ) {
53 55
 
54 56
 			//Verify the nonce before proceeding.
55
-			if ( !isset( $_POST['metaBoxName_nonce'] ) || !wp_verify_nonce( $_POST['metaBoxName_nonce'], basename( __FILE__ ) ) )
56
-				return $post_id;
57
+			if ( !isset( $_POST['metaBoxName_nonce'] ) || !wp_verify_nonce( $_POST['metaBoxName_nonce'], basename( __FILE__ ) ) ) {
58
+							return $post_id;
59
+			}
57 60
 
58 61
 			//Get the post type object.
59 62
 			$post_type = get_post_type_object( $post->post_type );
60 63
 
61 64
 			//Check if the current user has permission to edit the post.
62
-			if ( !current_user_can( $post_type->cap->edit_post, $post_id ) )
63
-				return $post_id;
65
+			if ( !current_user_can( $post_type->cap->edit_post, $post_id ) ) {
66
+							return $post_id;
67
+			}
64 68
 
65 69
 			//Get the posted data and sanitize it for use as an HTML class.
66 70
 			$new_meta_value = ( isset( $_POST['metaBoxName'] ) ? sanitize_html_class( $_POST['metaBoxName'] ) : '' );
Please login to merge, or discard this patch.