Passed
Push — master ( e0c498...d80a24 )
by Nirjhar
04:11
created
autoload.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined('ABSPATH')) exit;
3 3
 
4 4
 //Main plugin object to define the plugin
5
-if ( ! class_exists( 'CGSS_BUILD' ) ) {
5
+if ( ! class_exists('CGSS_BUILD')) {
6 6
 	
7 7
 	final class CGSS_BUILD {
8 8
 
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
 				$install->phpVerAllowed = '5.4';
18 18
 				$install->pluginPageLinks = array(
19 19
 												array(
20
-													'slug' => home_url().'/wp-admin/admin.php?page=seo-scan',
21
-													'label' => __( 'Dashboard', 'cgss' )
20
+													'slug' => home_url() . '/wp-admin/admin.php?page=seo-scan',
21
+													'label' => __('Dashboard', 'cgss')
22 22
 												),
23 23
 											);
24 24
 				$install->do();
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
 		public function db_install() {
30 30
 
31
-			if ( class_exists( 'CGSS_DB' ) ) {
31
+			if (class_exists('CGSS_DB')) {
32 32
 				$db = new CGSS_DB();
33 33
 				$db->table = 'cgss_insight';
34 34
 				$db->sql = "ID mediumint(9) NOT NULL AUTO_INCREMENT,
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 			$tableName = 'cgss_insight';
48 48
 
49 49
 			global $wpdb;
50
-			$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}$tableName" );
50
+			$wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}$tableName");
51 51
 		}
52 52
 
53 53
 
@@ -56,23 +56,23 @@  discard block
 block discarded – undo
56 56
 			global $wpdb;
57 57
 
58 58
 			$result = $wpdb->get_results("SELECT * from {$wpdb->prefix}cgss_insight");
59
-    		if(count($result) == 0) {
59
+    		if (count($result) == 0) {
60 60
 
61 61
 			$init_insight = array(
62
-					__('Score','cgss'),
63
-					__('Snippet','cgss'),
64
-					__('Text','cgss'),
65
-					__('Links','cgss'),
66
-					__('Keywords','cgss'),
67
-					__('Images','cgss'),
68
-					__('Responsive','cgss'),
69
-					__('Speed','cgss'),
70
-					__('Social','cgss')
62
+					__('Score', 'cgss'),
63
+					__('Snippet', 'cgss'),
64
+					__('Text', 'cgss'),
65
+					__('Links', 'cgss'),
66
+					__('Keywords', 'cgss'),
67
+					__('Images', 'cgss'),
68
+					__('Responsive', 'cgss'),
69
+					__('Speed', 'cgss'),
70
+					__('Social', 'cgss')
71 71
 				);
72
-			$no_data = __( 'No scan reports are available yet', 'cgss' );
72
+			$no_data = __('No scan reports are available yet', 'cgss');
73 73
 			foreach ($init_insight as $key => $value) {
74 74
 				$sql = $wpdb->prepare(
75
-					"INSERT INTO {$wpdb->prefix}cgss_insight ( ID, item, remark ) VALUES ( %d, %s, %s )", ($key+1), $value, $no_data
75
+					"INSERT INTO {$wpdb->prefix}cgss_insight ( ID, item, remark ) VALUES ( %d, %s, %s )", ($key + 1), $value, $no_data
76 76
 					);
77 77
 				$query = $wpdb->query($sql);
78 78
 			}
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		//Include scripts
84 84
 		public function scripts() {
85 85
 
86
-			if ( class_exists( 'CGSS_SCRIPT' ) ) new CGSS_SCRIPT();
86
+			if (class_exists('CGSS_SCRIPT')) new CGSS_SCRIPT();
87 87
 		}
88 88
 
89 89
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 		//Include settings pages
92 92
 		public function settings() {
93 93
 
94
-			if ( class_exists( 'CGSS_SETTINGS' ) ) new CGSS_SETTINGS();
94
+			if (class_exists('CGSS_SETTINGS')) new CGSS_SETTINGS();
95 95
 		}
96 96
 
97 97
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		// Add custom insight action
100 100
 		public function insight() {
101 101
 
102
-			if ( class_exists( 'CGSS_INSIGHT' ) ) new CGSS_INSIGHT();
102
+			if (class_exists('CGSS_INSIGHT')) new CGSS_INSIGHT();
103 103
 		}
104 104
 
105 105
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 		// Add custom insight action
108 108
 		public function compete() {
109 109
 
110
-			if ( class_exists( 'CGSS_COMPETE' ) ) new CGSS_COMPETE();
110
+			if (class_exists('CGSS_COMPETE')) new CGSS_COMPETE();
111 111
 		}
112 112
 
113 113
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 		// Add custom insight action
116 116
 		public function scan() {
117 117
 
118
-			if ( class_exists( 'CGSS_SCAN' ) ) new CGSS_SCAN();
118
+			if (class_exists('CGSS_SCAN')) new CGSS_SCAN();
119 119
 		}
120 120
 
121 121
 
@@ -148,9 +148,9 @@  discard block
 block discarded – undo
148 148
 		//Call the dependency files
149 149
 		public function helpers() {
150 150
 
151
-			if ( ! class_exists( 'WP_List_Table' ) ) {
152
-    			require_once( ABSPATH . 'wp-admin/includes/screen.php' );
153
-    			require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
151
+			if ( ! class_exists('WP_List_Table')) {
152
+    			require_once(ABSPATH . 'wp-admin/includes/screen.php');
153
+    			require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
154 154
 			}
155 155
 
156 156
 			require_once ('lib/table.php');
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
 			$this->helpers();
171 171
 			$this->functionality();
172 172
 
173
-			register_activation_hook( CGSS_FILE, array( $this, 'db_install' ) );
174
-			register_uninstall_hook( CGSS_FILE, array( 'CGSS_BUILD', 'db_uninstall' ) ); //$this won't work here.
173
+			register_activation_hook(CGSS_FILE, array($this, 'db_install'));
174
+			register_uninstall_hook(CGSS_FILE, array('CGSS_BUILD', 'db_uninstall')); //$this won't work here.
175 175
 
176 176
 			add_action('init', array($this, 'installation'));
177 177
 
@@ -180,9 +180,9 @@  discard block
 block discarded – undo
180 180
 			$this->settings();
181 181
 
182 182
 			// Add custom actions, defined in settings
183
-			add_action( 'cgss_scan', array( $this, 'scan' ) );
184
-			add_action( 'cgss_compete', array( $this, 'compete' ) );
185
-			add_action( 'cgss_fetch_insight', array( $this, 'insight' ) );
183
+			add_action('cgss_scan', array($this, 'scan'));
184
+			add_action('cgss_compete', array($this, 'compete'));
185
+			add_action('cgss_fetch_insight', array($this, 'insight'));
186 186
 		}
187 187
 	}
188 188
 } ?>
189 189
\ No newline at end of file
Please login to merge, or discard this patch.