Passed
Push — master ( 862b0e...047a35 )
by Stiofan
17:04
created
templates/emails/wpinv-email-header.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 // don't load directly
3
-if ( !defined('ABSPATH') )
3
+if ( !defined('ABSPATH') ) {
4 4
     die('-1');
5
+}
5 6
 
6 7
 if ( !isset( $email_heading ) ) {
7 8
     global $email_heading;
Please login to merge, or discard this patch.
templates/emails/wpinv-email-billing-details.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 // don't load directly
3
-if ( !defined('ABSPATH') )
3
+if ( !defined('ABSPATH') ) {
4 4
     die('-1');
5
+}
5 6
 
6 7
 do_action( 'wpinv_email_before_billing_details', $invoice ); ?>
7 8
 <div id="wpinv-email-billing">
Please login to merge, or discard this patch.
includes/admin/admin-pages.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -196,8 +196,9 @@
 block discarded – undo
196 196
             foreach ( $types as $name => $type ) {
197 197
                 echo '<option value="' . esc_attr( $name ) . '"';
198 198
 
199
-                if ( isset( $_GET['discount_type'] ) )
200
-                    selected( $name, $_GET['discount_type'] );
199
+                if ( isset( $_GET['discount_type'] ) ) {
200
+                                    selected( $name, $_GET['discount_type'] );
201
+                }
201 202
 
202 203
                 echo '>' . esc_html__( $type, 'invoicing' ) . '</option>';
203 204
             }
Please login to merge, or discard this patch.
includes/wpinv-gateway-functions.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
     if ( !wpinv_is_gateway_active( $enabled_gateway ) && !empty( $gateways ) ) {
311 311
         if(wpinv_is_gateway_active( wpinv_get_default_gateway()) ){
312 312
             $enabled_gateway = wpinv_get_default_gateway();
313
-        }else{
313
+        } else{
314 314
             $enabled_gateway = $gateways[0];
315 315
         }
316 316
 
@@ -336,8 +336,9 @@  discard block
 block discarded – undo
336 336
 
337 337
 	$payments = new WP_Query( $args );
338 338
 
339
-	if( $payments )
340
-		$ret = $payments->post_count;
339
+	if( $payments ) {
340
+			$ret = $payments->post_count;
341
+	}
341 342
 	return $ret;
342 343
 }
343 344
 
Please login to merge, or discard this patch.
includes/class-wpinv-db.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Exit if accessed directly
4
-if ( ! defined( 'ABSPATH' ) ) exit;
4
+if ( ! defined( 'ABSPATH' ) ) {
5
+    exit;
6
+}
5 7
 
6 8
 abstract class Wpinv_DB {
7 9
 
Please login to merge, or discard this patch.
includes/admin/class-wpinv-users.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
 
80 80
         if(empty($count)){
81 81
             $output .= __('No Invoice(s)','invoicing');
82
-        }else{
82
+        } else{
83 83
             $link_url = admin_url( "edit.php?post_type=wpi_invoice&author=".absint($user_id) );
84 84
             $link_text = sprintf( __('Invoices ( %d )', 'invoicing'), $count );
85 85
             $output .= "<a href='$link_url' >$link_text</a>";
Please login to merge, or discard this patch.
vendor/ayecode/wp-super-duper/map.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -227,7 +227,7 @@
 block discarded – undo
227 227
 
228 228
 		if($args['type']=='image'){
229 229
 			$output .= "<img src='https://maps.googleapis.com/maps/api/staticmap?center=".esc_attr($args['location'])."&maptype=".esc_attr($args['maptype'])."&zoom=".esc_attr($args['zoom'])."&size=".esc_attr($args['static_width'])."x".esc_attr($args['static_height'])."&key=".esc_attr($args['api_key'])."' />";
230
-		}else{
230
+		} else{
231 231
 			$output .= "<iframe width='".esc_attr($args['width'])."' height='".esc_attr($args['height'])."' frameborder='0' allowfullscreen style='border:0;' src='https://www.google.com/maps/embed/v1/".esc_attr($args['type'])."?q=".esc_attr($args['location'])."&maptype=".esc_attr($args['maptype'])."&zoom=".esc_attr($args['zoom'])."&key=".esc_attr($args['api_key'])."' ></iframe> ";
232 232
 		}
233 233
 
Please login to merge, or discard this patch.
includes/class-wpinv-addons.php 1 patch
Braces   +11 added lines, -12 removed lines patch added patch discarded remove patch
@@ -45,8 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
 		if($section_id=='recommended_plugins'){
47 47
 			$section_data->products = self::get_recommend_wp_plugins_edd_formatted();
48
-		}
49
-		elseif ( ! empty( $section ) ) {
48
+		} elseif ( ! empty( $section ) ) {
50 49
 			if ( false === ( $section_data = get_transient( 'wpi_addons_section_' . $section_id ) ) ) { //@todo restore after testing
51 50
 			//if ( 1==1) {
52 51
 
@@ -121,13 +120,13 @@  discard block
 block discarded – undo
121 120
 			$button_args['file'] = isset($status['file']) ? $status['file'] : '';
122 121
 			if(isset($status['status'])){$button_args['install_status'] = $status['status'];}
123 122
 			$button_args['update_url'] = "https://wpinvoicing.com";
124
-		}elseif($current_tab == 'themes' && isset($addon->info->id) && $addon->info->id) {
123
+		} elseif($current_tab == 'themes' && isset($addon->info->id) && $addon->info->id) {
125 124
 			if(!empty($addon->licensing->edd_slug)){$button_args['slug'] = $addon->licensing->edd_slug;}
126 125
 			$button_args['installed'] = self::is_theme_installed($addon);
127 126
 			if(!in_array($button_args['slug'],$wp_org_themes)){
128 127
 				$button_args['update_url'] = "https://wpinvoicing.com";
129 128
 			}
130
-		}elseif($current_tab == 'recommended_plugins' && isset($addon->info->slug) && $addon->info->slug){
129
+		} elseif($current_tab == 'recommended_plugins' && isset($addon->info->slug) && $addon->info->slug){
131 130
 			include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api..
132 131
 			$status = install_plugin_install_status(array("slug"=>$button_args['slug'],"version"=>""));
133 132
 			$button_args['install_status'] = isset($status['status']) ? $status['status'] : 'install';
@@ -139,7 +138,7 @@  discard block
 block discarded – undo
139 138
 			if(is_object($addon->pricing)){
140 139
 				$prices = (Array)$addon->pricing;
141 140
 				$button_args['price'] = reset($prices);
142
-			}elseif(isset($addon->pricing)){
141
+			} elseif(isset($addon->pricing)){
143 142
 				$button_args['price'] = $addon->pricing;
144 143
 			}
145 144
 		}
@@ -160,7 +159,7 @@  discard block
 block discarded – undo
160 159
 		if($button_args['installed'] && ($button_args['file'] || $button_args['type'] == 'themes')){
161 160
 			if($button_args['type'] != 'themes'){
162 161
 				$button_args['active'] = is_plugin_active($button_args['file']);
163
-			}else{
162
+			} else{
164 163
 				$button_args['active'] = self::is_theme_active($addon);
165 164
 			}
166 165
 		}
@@ -169,27 +168,27 @@  discard block
 block discarded – undo
169 168
 		if($button_args['active']){
170 169
 			$button_args['button_text'] = __('Active','invoicing');
171 170
 			$button_args['class'] = ' button-secondary disabled ';
172
-		}elseif($button_args['installed']){
171
+		} elseif($button_args['installed']){
173 172
 			$button_args['button_text'] = __('Activate','invoicing');
174 173
 
175 174
 			if($button_args['type'] != 'themes'){
176 175
 				if ( current_user_can( 'manage_options' ) ) {
177 176
 					$button_args['url'] = wp_nonce_url(admin_url('plugins.php?action=activate&plugin='.$button_args['file']), 'activate-plugin_' . $button_args['file']);
178
-				}else{
177
+				} else{
179 178
 					$button_args['url'] = '#';
180 179
 				}
181
-			}else{
180
+			} else{
182 181
 				if ( current_user_can( 'switch_themes' ) ) {
183 182
 					$button_args['url'] = self::get_theme_activation_url($addon);
184
-				}else{
183
+				} else{
185 184
 					$button_args['url'] = '#';
186 185
 				}
187 186
 			}
188 187
 
189
-		}else{
188
+		} else{
190 189
 			if($button_args['type'] == 'recommended_plugins'){
191 190
 				$button_args['button_text'] = __('Install','invoicing');
192
-			}else{
191
+			} else{
193 192
 				$button_args['button_text'] = __('Get it','invoicing');
194 193
 
195 194
 				/*if($button_args['type'] == 'themes' && in_array($button_args['slug'],$wp_org_themes) ){
Please login to merge, or discard this patch.
includes/libraries/class-ayecode-addons.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 // Exit if accessed directly
3
-if ( ! defined( 'ABSPATH' ) ) exit;
3
+if ( ! defined( 'ABSPATH' ) ) {
4
+    exit;
5
+}
4 6
 if(!class_exists('Ayecode_Addons')) {
5 7
 
6 8
     abstract class Ayecode_Addons
Please login to merge, or discard this patch.