Passed
Push — master ( 47b6fc...99ae46 )
by Brian
05:46 queued 20s
created
templates/payment-forms/elements/gateway_select.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,8 +64,8 @@
 block discarded – undo
64 64
                         $description = wpinv_get_gateway_description( $gateway );
65 65
 
66 66
                         if ( wpinv_is_test_mode( $gateway ) ) {
67
-						$sandbox_notice = apply_filters( "getpaid_{$gateway}_sandbox_notice", __( 'SANDBOX ENABLED: No real payments will occur.', 'invoicing' ) );
68
-						$description = "$description $sandbox_notice";
67
+                        $sandbox_notice = apply_filters( "getpaid_{$gateway}_sandbox_notice", __( 'SANDBOX ENABLED: No real payments will occur.', 'invoicing' ) );
68
+                        $description = "$description $sandbox_notice";
69 69
                         }
70 70
 
71 71
                         echo wpautop( wp_kses_post( $description ) );
Please login to merge, or discard this patch.
templates/payment-forms/elements/file_upload.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -21,20 +21,20 @@
 block discarded – undo
21 21
 
22 22
 foreach ( $file_types as $file_type ) {
23 23
 
24
-	if ( isset( $all_types[ $file_type ] ) ) {
25
-		$types[]   = $all_types[ $file_type ];
26
-		$file_type = explode( '|', $file_type );
27
-
28
-		foreach ( $file_type as $type ) {
29
-			$type     = trim( $type );
30
-			$types[]  = ".$type";
31
-			$_types[] = $type;
32
-		}
24
+    if ( isset( $all_types[ $file_type ] ) ) {
25
+        $types[]   = $all_types[ $file_type ];
26
+        $file_type = explode( '|', $file_type );
27
+
28
+        foreach ( $file_type as $type ) {
29
+            $type     = trim( $type );
30
+            $types[]  = ".$type";
31
+            $_types[] = $type;
32
+        }
33 33
 }
34 34
 }
35 35
 
36 36
 if ( ! empty( $required ) ) {
37
-	$label .= "<span class='text-danger'> *</span>";
37
+    $label .= "<span class='text-danger'> *</span>";
38 38
 }
39 39
 
40 40
 ?>
Please login to merge, or discard this patch.
templates/payment-forms/cart-totals.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -11,26 +11,26 @@  discard block
 block discarded – undo
11 11
 
12 12
 // Totals rows.
13 13
 $totals = apply_filters(
14
-	'getpaid_payment_form_cart_table_totals',
15
-	array(
16
-		'subtotal' => __( 'Subtotal', 'invoicing' ),
17
-		'tax'      => __( 'Tax', 'invoicing' ),
18
-		'fees'     => __( 'Fee', 'invoicing' ),
19
-		'discount' => __( 'Discount', 'invoicing' ),
20
-		'total'    => __( 'Total', 'invoicing' ),
21
-	),
22
-	$form
14
+    'getpaid_payment_form_cart_table_totals',
15
+    array(
16
+        'subtotal' => __( 'Subtotal', 'invoicing' ),
17
+        'tax'      => __( 'Tax', 'invoicing' ),
18
+        'fees'     => __( 'Fee', 'invoicing' ),
19
+        'discount' => __( 'Discount', 'invoicing' ),
20
+        'total'    => __( 'Total', 'invoicing' ),
21
+    ),
22
+    $form
23 23
 );
24 24
 
25 25
 $currency = $form->get_currency();
26 26
 $country  = wpinv_get_default_country();
27 27
 
28 28
 if ( ! empty( $form->invoice ) ) {
29
-	$country  = $form->invoice->get_country();
29
+    $country  = $form->invoice->get_country();
30 30
 }
31 31
 
32 32
 if ( ! wpinv_use_taxes() && isset( $totals['tax'] ) ) {
33
-	unset( $totals['tax'] );
33
+    unset( $totals['tax'] );
34 34
 }
35 35
 
36 36
 do_action( 'getpaid_before_payment_form_cart_totals', $form, $totals );
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
 
62 62
 							<?php
63 63
 
64
-								// Total tax.
65
-								if ( in_array( $key, array( 'tax', 'discount', 'subtotal', 'total', 'fees' ) ) ) {
66
-								echo wpinv_price( 0, $currency );
67
-								}
64
+                                // Total tax.
65
+                                if ( in_array( $key, array( 'tax', 'discount', 'subtotal', 'total', 'fees' ) ) ) {
66
+                                echo wpinv_price( 0, $currency );
67
+                                }
68 68
 
69
-								do_action( "getpaid_payment_form_cart_totals_$key", $form );
70
-							?>
69
+                                do_action( "getpaid_payment_form_cart_totals_$key", $form );
70
+                            ?>
71 71
 
72 72
 						</div>
73 73
 
Please login to merge, or discard this patch.
templates/payment-forms/form.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
         // And the optional invoice id.
48 48
         if ( ! empty( $form->invoice ) ) {
49
-		echo getpaid_hidden_field( 'invoice_id', $form->invoice->get_id() );
49
+        echo getpaid_hidden_field( 'invoice_id', $form->invoice->get_id() );
50 50
         }
51 51
 
52 52
         // We also want to include the form id.
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
 
67 67
                     foreach ( $form->get_elements() as $element ) {
68 68
 
69
-					if ( isset( $element['type'] ) ) {
70
-						$grid_class = esc_attr( getpaid_get_form_element_grid_class( $element ) );
71
-						echo "<div class='$grid_class'>";
72
-						do_action( 'getpaid_payment_form_element', $element, $form );
73
-						do_action( "getpaid_payment_form_element_{$element['type']}_template", $element, $form );
74
-						echo '</div>';
69
+                    if ( isset( $element['type'] ) ) {
70
+                        $grid_class = esc_attr( getpaid_get_form_element_grid_class( $element ) );
71
+                        echo "<div class='$grid_class'>";
72
+                        do_action( 'getpaid_payment_form_element', $element, $form );
73
+                        do_action( "getpaid_payment_form_element_{$element['type']}_template", $element, $form );
74
+                        echo '</div>';
75 75
                         }
76 76
 }
77 77
 
Please login to merge, or discard this patch.
templates/payment-forms/cart.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
             // Display the item totals.
46 46
             foreach ( $form->get_items() as $item ) {
47
-			wpinv_get_template( 'payment-forms/cart-item.php', compact( 'form', 'item', 'columns' ) );
47
+            wpinv_get_template( 'payment-forms/cart-item.php', compact( 'form', 'item', 'columns' ) );
48 48
             }
49 49
 
50 50
             // Display the cart totals.
Please login to merge, or discard this patch.
templates/emails/invoice-items.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,12 +44,12 @@
 block discarded – undo
44 44
 
45 45
                 // Display the item totals.
46 46
                 foreach ( $invoice->get_items() as $item ) {
47
-				wpinv_get_template( 'emails/invoice-item.php', compact( 'invoice', 'item', 'columns' ) );
47
+                wpinv_get_template( 'emails/invoice-item.php', compact( 'invoice', 'item', 'columns' ) );
48 48
                 }
49 49
 
50 50
                 // Display the fee totals.
51 51
                 foreach ( $invoice->get_fees() as $fee ) {
52
-				wpinv_get_template( 'emails/fee-item.php', compact( 'invoice', 'fee', 'columns' ) );
52
+                wpinv_get_template( 'emails/fee-item.php', compact( 'invoice', 'fee', 'columns' ) );
53 53
                 }
54 54
 
55 55
             ?>
Please login to merge, or discard this patch.
templates/emails/wpinv-email-billing-details.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 <a href="<?php echo esc_url( add_query_arg( 'user_id', $invoice->get_user_id(), self_admin_url( 'user-edit.php' ) ) ); ?>"><?php echo esc_html( $invoice->get_user_full_name() ); ?></a>
21 21
                     <?php
22 22
 } else {
23
-					echo esc_html( $invoice->get_user_full_name() ); }
23
+                    echo esc_html( $invoice->get_user_full_name() ); }
24 24
 ?>
25 25
 </td>
26 26
             </tr>
Please login to merge, or discard this patch.
templates/emails/invoice-totals.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,26 +45,26 @@
 block discarded – undo
45 45
 
46 46
                 // Total tax.
47 47
                 if ( 'tax' == $key ) {
48
-				echo wpinv_price( $invoice->get_total_tax(), $invoice->get_currency() );
48
+                echo wpinv_price( $invoice->get_total_tax(), $invoice->get_currency() );
49 49
                 }
50 50
 
51 51
                 if ( 'fee' == $key ) {
52
-				echo wpinv_price( $invoice->get_total_fees(), $invoice->get_currency() );
52
+                echo wpinv_price( $invoice->get_total_fees(), $invoice->get_currency() );
53 53
                 }
54 54
 
55 55
                 // Total discount.
56 56
                 if ( 'discount' == $key ) {
57
-				echo wpinv_price( $invoice->get_total_discount(), $invoice->get_currency() );
57
+                echo wpinv_price( $invoice->get_total_discount(), $invoice->get_currency() );
58 58
                 }
59 59
 
60 60
                 // Sub total.
61 61
                 if ( 'subtotal' == $key ) {
62
-				echo wpinv_price( $invoice->get_subtotal(), $invoice->get_currency() );
62
+                echo wpinv_price( $invoice->get_subtotal(), $invoice->get_currency() );
63 63
                 }
64 64
 
65 65
                 // Total.
66 66
                 if ( 'total' == $key ) {
67
-				echo wpinv_price( $invoice->get_total(), $invoice->get_currency() );
67
+                echo wpinv_price( $invoice->get_total(), $invoice->get_currency() );
68 68
                 }
69 69
 
70 70
                 // Fires when printing a cart total in an email.
Please login to merge, or discard this patch.
templates/emails/invoice-item.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -30,41 +30,41 @@
 block discarded – undo
30 30
                 // Item name.
31 31
                 if ( 'name' == $column ) {
32 32
 
33
-				// Display the name.
34
-				echo '<div class="wpinv_email_cart_item_title">' . esc_html( $item->get_name() ) . '</div>';
33
+                // Display the name.
34
+                echo '<div class="wpinv_email_cart_item_title">' . esc_html( $item->get_name() ) . '</div>';
35 35
 
36
-				// And an optional description.
37
-				$description = $item->get_description();
36
+                // And an optional description.
37
+                $description = $item->get_description();
38 38
 
39
-				if ( ! empty( $description ) ) {
40
-					$description = wp_kses_post( $description );
41
-					echo "<p class='small'>$description</p>";
39
+                if ( ! empty( $description ) ) {
40
+                    $description = wp_kses_post( $description );
41
+                    echo "<p class='small'>$description</p>";
42 42
                     }
43 43
 }
44 44
 
45 45
                 // Item price.
46 46
                 if ( 'price' == $column ) {
47 47
 
48
-				// Display the item price (or recurring price if this is a renewal invoice)
49
-				$price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
50
-				echo wpinv_price( $price, $invoice->get_currency() );
48
+                // Display the item price (or recurring price if this is a renewal invoice)
49
+                $price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
50
+                echo wpinv_price( $price, $invoice->get_currency() );
51 51
 
52 52
                 }
53 53
 
54 54
                 // Item quantity.
55 55
                 if ( 'quantity' == $column ) {
56
-				echo (float) $item->get_quantity();
56
+                echo (float) $item->get_quantity();
57 57
                 }
58 58
 
59 59
                 // Tax rate.
60 60
                 if ( 'tax_rate' == $column ) {
61
-				echo round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) . '%';
61
+                echo round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) . '%';
62 62
                 }
63 63
 
64 64
                 // Item sub total.
65 65
                 if ( 'subtotal' == $column ) {
66
-				$subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
67
-				echo wpinv_price( $subtotal, $invoice->get_currency() );
66
+                $subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
67
+                echo wpinv_price( $subtotal, $invoice->get_currency() );
68 68
                 }
69 69
 
70 70
                 // Fires when printing a line item column.
Please login to merge, or discard this patch.