Passed
Push — master ( a83567...99d634 )
by Stiofan
05:05
created
includes/libraries/wpinv-euvat/class-wpinv-euvat.php 1 patch
Braces   +10 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,8 @@  discard block
 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
 
5 7
 class WPInv_EUVat {
6 8
     private static $is_ajax = false;
@@ -672,7 +674,7 @@  discard block
 block discarded – undo
672 674
                 if ( !empty( $load_xml ) && !empty( $load_xml->geoplugin_countryCode ) ) {
673 675
                     $wpinv_ip_address_country = (string)$load_xml->geoplugin_countryCode;
674 676
                 }
675
-            }elseif(!empty( $ip )){
677
+            } elseif(!empty( $ip )){
676 678
                 $url = 'http://ip-api.com/json/' . $ip;
677 679
                 $response = wp_remote_get($url);
678 680
 
@@ -1468,16 +1470,18 @@  discard block
 block discarded – undo
1468 1470
 
1469 1471
         if ( !empty( $tax_rates ) ) {
1470 1472
             foreach ( $tax_rates as $key => $tax_rate ) {
1471
-                if ( $country != $tax_rate['country'] )
1472
-                    continue;
1473
+                if ( $country != $tax_rate['country'] ) {
1474
+                                    continue;
1475
+                }
1473 1476
 
1474 1477
                 if ( !empty( $tax_rate['global'] ) ) {
1475 1478
                     if ( 0 !== $tax_rate['rate'] || !empty( $tax_rate['rate'] ) ) {
1476 1479
                         $rate = number_format( $tax_rate['rate'], 4 );
1477 1480
                     }
1478 1481
                 } else {
1479
-                    if ( empty( $tax_rate['state'] ) || strtolower( $state ) != strtolower( $tax_rate['state'] ) )
1480
-                        continue;
1482
+                    if ( empty( $tax_rate['state'] ) || strtolower( $state ) != strtolower( $tax_rate['state'] ) ) {
1483
+                                            continue;
1484
+                    }
1481 1485
 
1482 1486
                     $state_rate = $tax_rate['rate'];
1483 1487
                     if ( 0 !== $state_rate || !empty( $state_rate ) ) {
Please login to merge, or discard this patch.
vendor/ayecode/wp-super-duper/wp-super-duper.php 1 patch
Braces   +14 added lines, -15 removed lines patch added patch discarded remove patch
@@ -180,9 +180,9 @@  discard block
 block discarded – undo
180 180
 							unset($param['default']);
181 181
 						}
182 182
 						$param['value'] = array(''=>__("No"),'1'=>__("Yes"));
183
-					}elseif($param['type'] == 'select'){
183
+					} elseif($param['type'] == 'select'){
184 184
 						$param['value'] = isset($val['options']) ? $val['options'] : array();
185
-					}else{
185
+					} else{
186 186
 						$param['value'] = isset($val['default']) ? $val['default'] : '';
187 187
 					}
188 188
 
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
 				<?php
641 641
 				if(! empty( $insert_shortcode_function )){
642 642
 					echo $insert_shortcode_function;
643
-				}else{
643
+				} else{
644 644
 
645 645
 				/**
646 646
 				 * Function for super duper insert shortcode.
@@ -1412,8 +1412,7 @@  discard block
 block discarded – undo
1412 1412
 					$argument_values[ $key ] = isset( $instance[ $key ] ) ? $instance[ $key ] : '';
1413 1413
 					if($args['type']=='checkbox' && $argument_values[ $key ] == ''){
1414 1414
 						// don't set default for an empty checkbox
1415
-					}
1416
-					elseif ( $argument_values[ $key ] == '' && isset( $args['default'] ) ) {
1415
+					} elseif ( $argument_values[ $key ] == '' && isset( $args['default'] ) ) {
1417 1416
 						$argument_values[ $key ] = $args['default'];
1418 1417
 					}
1419 1418
 				}
@@ -1542,11 +1541,11 @@  discard block
 block discarded – undo
1542 1541
 			$fa_type = '';
1543 1542
 			if(substr( $icon, 0, 7 ) === "fas fa-"){
1544 1543
 				$fa_type = 'solid';
1545
-			}elseif(substr( $icon, 0, 7 ) === "far fa-"){
1544
+			} elseif(substr( $icon, 0, 7 ) === "far fa-"){
1546 1545
 				$fa_type = 'regular';
1547
-			}elseif(substr( $icon, 0, 7 ) === "fab fa-"){
1546
+			} elseif(substr( $icon, 0, 7 ) === "fab fa-"){
1548 1547
 				$fa_type = 'brands';
1549
-			}else{
1548
+			} else{
1550 1549
 				$icon = "'".$icon."'";
1551 1550
 			}
1552 1551
 
@@ -1569,7 +1568,7 @@  discard block
 block discarded – undo
1569 1568
 					if(isset($args['group'])){
1570 1569
 						$temp_arguments[$args['group']][$key] = $args;
1571 1570
 						$add_sections = true;
1572
-					}else{
1571
+					} else{
1573 1572
 						$temp_arguments[$general][$key] = $args;
1574 1573
 					}
1575 1574
 				}
@@ -1816,7 +1815,7 @@  discard block
 block discarded – undo
1816 1815
 									?>
1817 1816
 									el(wp.components.PanelBody, {
1818 1817
 											title: '<?php esc_attr_e($key); ?>',
1819
-											initialOpen: <?php if($panel_count){echo "false";}else{echo "true";}?>
1818
+											initialOpen: <?php if($panel_count){echo "false";} else{echo "true";}?>
1820 1819
 										},
1821 1820
 										<?php
1822 1821
 
@@ -1829,7 +1828,7 @@  discard block
 block discarded – undo
1829 1828
 									$panel_count++;
1830 1829
 
1831 1830
 									}
1832
-									}else{
1831
+									} else{
1833 1832
 										foreach($this->arguments as $key => $args){
1834 1833
 											$this->build_block_arguments($key, $args);
1835 1834
 										}
@@ -1846,7 +1845,7 @@  discard block
 block discarded – undo
1846 1845
 								// If the user sets block-output array then build it
1847 1846
 								if ( ! empty( $this->options['block-output'] ) ) {
1848 1847
 								$this->block_element( $this->options['block-output'] );
1849
-							}else{
1848
+							} else{
1850 1849
 								// if no block-output is set then we try and get the shortcode html output via ajax.
1851 1850
 								?>
1852 1851
 								el('div', {
@@ -1916,7 +1915,7 @@  discard block
 block discarded – undo
1916 1915
 							?>
1917 1916
 							return content;
1918 1917
 							<?php
1919
-							}else{
1918
+							} else{
1920 1919
 							?>
1921 1920
 							var block_wrap = 'div';
1922 1921
 							if (attr.hasOwnProperty("block_wrap")) {
@@ -1971,7 +1970,7 @@  discard block
 block discarded – undo
1971 1970
 				$type = 'CheckboxControl';
1972 1971
 				$extra .= "checked: props.attributes.$key,";
1973 1972
 				$onchange = "props.setAttributes({ $key: ! props.attributes.$key } )";
1974
-			}elseif ( $args['type'] == 'textarea' ) {
1973
+			} elseif ( $args['type'] == 'textarea' ) {
1975 1974
 				$type = 'TextareaControl';
1976 1975
 			} elseif ( $args['type'] == 'select' || $args['type'] == 'multiselect' ) {
1977 1976
 				$type = 'SelectControl';
@@ -2415,7 +2414,7 @@  discard block
 block discarded – undo
2415 2414
 						$panel_count++;
2416 2415
 
2417 2416
 					}
2418
-				}else{
2417
+				} else{
2419 2418
 					foreach ( $arguments as $key => $args ) {
2420 2419
 						$this->widget_inputs( $args, $instance );
2421 2420
 					}
Please login to merge, or discard this patch.