Passed
Push — master ( 4aba8a...3509e3 )
by Brian
13:31
created
templates/invoice/header-right-actions.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * @var WPInv_Invoice $invoice
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+defined('ABSPATH') || exit;
12 12
 
13 13
 ?>
14 14
 
@@ -16,48 +16,48 @@  discard block
 block discarded – undo
16 16
 
17 17
         <?php
18 18
 
19
-            $actions   = array();
19
+            $actions = array();
20 20
 
21 21
             echo sprintf(
22 22
                 '<a href="javascript:void(0)" class="btn btn-sm m-1 d-inline-block btn-secondary invoice-action-print d-none d-lg-inline-block" onclick="window.print();">%s</a>',
23 23
                 sprintf(
24
-                    esc_html__( 'Print %s', 'invoicing' ),
25
-                    esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
24
+                    esc_html__('Print %s', 'invoicing'),
25
+                    esc_html(ucfirst($invoice->get_invoice_quote_type()))
26 26
                 )
27 27
             );
28 28
 
29
-            if ( is_user_logged_in() ) {
29
+            if (is_user_logged_in()) {
30 30
 
31 31
                 $actions[] = sprintf(
32 32
                     '<a href="%s" class="btn btn-sm btn-secondary m-1 d-inline-block invoice-action-history">%s</a>',
33
-                    esc_url( wpinv_get_history_page_uri( $invoice->get_post_type() ) ),
33
+                    esc_url(wpinv_get_history_page_uri($invoice->get_post_type())),
34 34
                     sprintf(
35
-                        __( '%s History', 'invoicing' ),
36
-                        esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
35
+                        __('%s History', 'invoicing'),
36
+                        esc_html(ucfirst($invoice->get_invoice_quote_type()))
37 37
                     )
38 38
                 );
39 39
 
40 40
             }
41 41
 
42
-            if ( wpinv_current_user_can_manage_invoicing() ) {
42
+            if (wpinv_current_user_can_manage_invoicing()) {
43 43
 
44 44
                 $actions[] = sprintf(
45 45
                     '<a href="%s" class="btn btn-sm btn-secondary m-1 d-inline-block invoice-action-edit">%s</a>',
46
-                    esc_url( get_edit_post_link( $invoice->get_id() ) ),
46
+                    esc_url(get_edit_post_link($invoice->get_id())),
47 47
                     sprintf(
48
-                        __( 'Edit %s', 'invoicing' ),
49
-                        esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
48
+                        __('Edit %s', 'invoicing'),
49
+                        esc_html(ucfirst($invoice->get_invoice_quote_type()))
50 50
                     )
51 51
                 );
52 52
 
53 53
             }
54 54
 
55
-            $actions = apply_filters( 'getpaid_invoice_header_right_actions_array', $actions, $invoice );
56
-            echo wp_kses_post( implode( '', $actions ) );
55
+            $actions = apply_filters('getpaid_invoice_header_right_actions_array', $actions, $invoice);
56
+            echo wp_kses_post(implode('', $actions));
57 57
 
58 58
         ?>
59 59
 
60
-        <?php do_action( 'wpinv_invoice_display_right_actions', $invoice ); ?>
60
+        <?php do_action('wpinv_invoice_display_right_actions', $invoice); ?>
61 61
     </div>
62 62
 
63 63
 <?php
Please login to merge, or discard this patch.
templates/invoice/invoice-type.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 ?>
13 13
 <h2 class="h3 text-dark">
14
-    <?php echo esc_html( apply_filters( 'getpaid_invoice_type_label', esc_html( ucfirst( $invoice->get_invoice_quote_type() ) ), $invoice ) ); ?>
14
+    <?php echo esc_html(apply_filters('getpaid_invoice_type_label', esc_html(ucfirst($invoice->get_invoice_quote_type())), $invoice)); ?>
15 15
 </h2>
16 16
 
17 17
 <?php
Please login to merge, or discard this patch.
templates/invoice/fee-item.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -31,21 +31,21 @@  discard block
 block discarded – undo
31 31
                     // Item name.
32 32
                     if ( 'name' == $column ) {
33 33
 
34
-					// Display the name.
35
-					echo '<div class="mb-1">' . esc_html( $fee['name'] ) . '</div>';
34
+                    // Display the name.
35
+                    echo '<div class="mb-1">' . esc_html( $fee['name'] ) . '</div>';
36 36
 
37
-					// And an optional description.
38
-					$description = empty( $fee['description'] ) ? esc_html__( 'Fee', 'invoicing' ) : esc_html( $fee['description'] );
39
-					echo wp_kses_post( "<small class='form-text text-muted pr-2 m-0'>$description</small>" );
37
+                    // And an optional description.
38
+                    $description = empty( $fee['description'] ) ? esc_html__( 'Fee', 'invoicing' ) : esc_html( $fee['description'] );
39
+                    echo wp_kses_post( "<small class='form-text text-muted pr-2 m-0'>$description</small>" );
40 40
 
41 41
                     }
42 42
 
43 43
                     // Item price.
44 44
                     if ( 'price' == $column ) {
45 45
 
46
-					// Display the item price (or recurring price if this is a renewal invoice)
47
-					if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
48
-						wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
46
+                    // Display the item price (or recurring price if this is a renewal invoice)
47
+                    if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
48
+                        wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
49 49
                         } else {
50 50
                             wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() );
51 51
                         }
@@ -53,20 +53,20 @@  discard block
 block discarded – undo
53 53
 
54 54
                     // Item quantity.
55 55
                     if ( 'quantity' == $column ) {
56
-					echo '&mdash;';
56
+                    echo '&mdash;';
57 57
                     }
58 58
 
59 59
                     // Item tax.
60 60
                     if ( 'tax_rate' == $column ) {
61
-					echo '&mdash;';
61
+                    echo '&mdash;';
62 62
                     }
63 63
 
64 64
                     // Item sub total.
65 65
                     if ( 'subtotal' == $column ) {
66 66
 
67
-					// Display the item price (or recurring price if this is a renewal invoice)
68
-					if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
69
-						wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
67
+                    // Display the item price (or recurring price if this is a renewal invoice)
68
+                    if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
69
+                        wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
70 70
                         } else {
71 71
                             wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() );
72 72
                         }
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
  * @var array $fee
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) || exit;
12
+defined('ABSPATH') || exit;
13 13
 
14
-do_action( 'getpaid_before_invoice_fee_item', $invoice, $fee );
14
+do_action('getpaid_before_invoice_fee_item', $invoice, $fee);
15 15
 
16 16
 ?>
17 17
 
@@ -19,64 +19,64 @@  discard block
 block discarded – undo
19 19
 
20 20
     <div class="form-row row">
21 21
 
22
-        <?php foreach ( array_keys( $columns ) as $column ) : ?>
22
+        <?php foreach (array_keys($columns) as $column) : ?>
23 23
 
24
-            <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm'; ?> getpaid-invoice-item-<?php echo esc_attr( $column ); ?>">
24
+            <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm'; ?> getpaid-invoice-item-<?php echo esc_attr($column); ?>">
25 25
 
26 26
                 <?php
27 27
 
28 28
                     // Fires before printing a fee item column.
29
-                    do_action( "getpaid_invoice_fee_item_before_$column", $fee, $invoice );
29
+                    do_action("getpaid_invoice_fee_item_before_$column", $fee, $invoice);
30 30
 
31 31
                     // Item name.
32
-                    if ( 'name' == $column ) {
32
+                    if ('name' == $column) {
33 33
 
34 34
 					// Display the name.
35
-					echo '<div class="mb-1">' . esc_html( $fee['name'] ) . '</div>';
35
+					echo '<div class="mb-1">' . esc_html($fee['name']) . '</div>';
36 36
 
37 37
 					// And an optional description.
38
-					$description = empty( $fee['description'] ) ? esc_html__( 'Fee', 'invoicing' ) : esc_html( $fee['description'] );
39
-					echo wp_kses_post( "<small class='form-text text-muted pr-2 m-0'>$description</small>" );
38
+					$description = empty($fee['description']) ? esc_html__('Fee', 'invoicing') : esc_html($fee['description']);
39
+					echo wp_kses_post("<small class='form-text text-muted pr-2 m-0'>$description</small>");
40 40
 
41 41
                     }
42 42
 
43 43
                     // Item price.
44
-                    if ( 'price' == $column ) {
44
+                    if ('price' == $column) {
45 45
 
46 46
 					// Display the item price (or recurring price if this is a renewal invoice)
47
-					if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
48
-						wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
47
+					if ($invoice->is_recurring() && $invoice->is_renewal()) {
48
+						wpinv_the_price($fee['recurring_fee'], $invoice->get_currency());
49 49
                         } else {
50
-                            wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() );
50
+                            wpinv_the_price($fee['initial_fee'], $invoice->get_currency());
51 51
                         }
52 52
 }
53 53
 
54 54
                     // Item quantity.
55
-                    if ( 'quantity' == $column ) {
55
+                    if ('quantity' == $column) {
56 56
 					echo '&mdash;';
57 57
                     }
58 58
 
59 59
                     // Item tax.
60
-                    if ( 'tax_rate' == $column ) {
60
+                    if ('tax_rate' == $column) {
61 61
 					echo '&mdash;';
62 62
                     }
63 63
 
64 64
                     // Item sub total.
65
-                    if ( 'subtotal' == $column ) {
65
+                    if ('subtotal' == $column) {
66 66
 
67 67
 					// Display the item price (or recurring price if this is a renewal invoice)
68
-					if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
69
-						wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
68
+					if ($invoice->is_recurring() && $invoice->is_renewal()) {
69
+						wpinv_the_price($fee['recurring_fee'], $invoice->get_currency());
70 70
                         } else {
71
-                            wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() );
71
+                            wpinv_the_price($fee['initial_fee'], $invoice->get_currency());
72 72
                         }
73 73
 }
74 74
 
75 75
                     // Fires when printing a fee item column.
76
-                    do_action( "getpaid_invoice_fee_item_$column", $fee, $invoice );
76
+                    do_action("getpaid_invoice_fee_item_$column", $fee, $invoice);
77 77
 
78 78
                     // Fires after printing a fee item column.
79
-                    do_action( "getpaid_invoice_fee_item_after_$column", $fee, $invoice );
79
+                    do_action("getpaid_invoice_fee_item_after_$column", $fee, $invoice);
80 80
 
81 81
                 ?>
82 82
 
Please login to merge, or discard this patch.
templates/payment-forms/elements/gateway_select.php 2 patches
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 wp_kses_post( wpautop( $description ) );
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -7,45 +7,45 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 // The payment methods select title.
13
-if ( empty( $text ) ) {
14
-    $text = __( 'Select Payment Method', 'invoicing' );
13
+if (empty($text)) {
14
+    $text = __('Select Payment Method', 'invoicing');
15 15
 }
16 16
 
17 17
 // An array of active payment methods.
18
-$gateways = wpinv_get_enabled_payment_gateways( true );
18
+$gateways = wpinv_get_enabled_payment_gateways(true);
19 19
 
20 20
 // The current invoice id.
21 21
 $invoice_id     = 0;
22 22
 $chosen_gateway = wpinv_get_default_gateway();
23 23
 
24
-if ( ! empty( $form->invoice ) ) {
24
+if (!empty($form->invoice)) {
25 25
     $invoice_id = $form->invoice->get_id();
26 26
     $chosen_gateway = $form->invoice->get_gateway();
27 27
 }
28 28
 
29 29
 ?>
30 30
 
31
-    <?php do_action( 'getpaid_before_payment_form_gateway_select', $form ); ?>
31
+    <?php do_action('getpaid_before_payment_form_gateway_select', $form); ?>
32 32
     <div class="mt-4 mb-4 getpaid-gateways">
33 33
 
34
-        <?php do_action( 'wpinv_payment_mode_top', $invoice_id, $chosen_gateway, $gateways, $form ); ?>
34
+        <?php do_action('wpinv_payment_mode_top', $invoice_id, $chosen_gateway, $gateways, $form); ?>
35 35
 
36 36
         <div class="getpaid-select-gateway-title-div">
37
-            <h6><?php echo esc_html( $text ); ?></h6>
37
+            <h6><?php echo esc_html($text); ?></h6>
38 38
         </div>
39 39
 
40 40
         <div class="getpaid-available-gateways-div">
41 41
 
42
-            <?php foreach ( array_keys( $gateways ) as $gateway ) : ?>
42
+            <?php foreach (array_keys($gateways) as $gateway) : ?>
43 43
 
44
-                <div class="pt-1 pb-1 getpaid-gateway getpaid-gateway-<?php echo esc_attr( $gateway ); ?>" data-checkout-label='<?php echo esc_attr( apply_filters( "getpaid_gateway_{$gateway}_checkout_button_label", '' ) ); ?>'>
44
+                <div class="pt-1 pb-1 getpaid-gateway getpaid-gateway-<?php echo esc_attr($gateway); ?>" data-checkout-label='<?php echo esc_attr(apply_filters("getpaid_gateway_{$gateway}_checkout_button_label", '')); ?>'>
45 45
 
46 46
                     <label class="form-label d-block w-100 getpaid-gateway-radio">
47
-                        <input type="radio" value="<?php echo esc_attr( $gateway ); ?>" <?php checked( $gateway, $chosen_gateway ); ?> name="wpi-gateway">
48
-                        <span><?php echo esc_html( wpinv_get_gateway_checkout_label( $gateway ) ); ?></span>
47
+                        <input type="radio" value="<?php echo esc_attr($gateway); ?>" <?php checked($gateway, $chosen_gateway); ?> name="wpi-gateway">
48
+                        <span><?php echo esc_html(wpinv_get_gateway_checkout_label($gateway)); ?></span>
49 49
                     </label>
50 50
 
51 51
                 </div>
@@ -56,22 +56,22 @@  discard block
 block discarded – undo
56 56
 
57 57
         <div class="getpaid-gateway-descriptions-div">
58 58
 
59
-            <?php foreach ( array_keys( $gateways ) as $gateway ) : ?>
59
+            <?php foreach (array_keys($gateways) as $gateway) : ?>
60 60
 
61
-                <div class="my-2 p-3 bg-light border getpaid-gateway-description getpaid-description-<?php echo esc_attr( $gateway ); ?>" style="display: none;">
61
+                <div class="my-2 p-3 bg-light border getpaid-gateway-description getpaid-description-<?php echo esc_attr($gateway); ?>" style="display: none;">
62 62
                     <?php
63 63
 
64
-                        $description = wpinv_get_gateway_description( $gateway );
64
+                        $description = wpinv_get_gateway_description($gateway);
65 65
 
66
-                        if ( wpinv_is_test_mode( $gateway ) ) {
67
-						$sandbox_notice = apply_filters( "getpaid_{$gateway}_sandbox_notice", __( 'SANDBOX ENABLED: No real payments will occur.', 'invoicing' ) );
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 68
 						$description = "$description $sandbox_notice";
69 69
                         }
70 70
 
71
-                        echo wp_kses_post( wpautop( $description ) );
71
+                        echo wp_kses_post(wpautop($description));
72 72
 
73
-                        do_action( 'wpinv_' . $gateway . '_checkout_fields', $invoice_id );
74
-                        do_action( 'wpinv_' . $gateway . '_cc_form', $invoice_id, $form );
73
+                        do_action('wpinv_' . $gateway . '_checkout_fields', $invoice_id);
74
+                        do_action('wpinv_' . $gateway . '_cc_form', $invoice_id, $form);
75 75
 
76 76
                     ?>
77 77
                 </div>
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             <?php
85 85
                 aui()->alert(
86 86
                     array(
87
-                        'content' => __( 'None of the available payment gateways support purchasing recurring items.', 'invoicing' ),
87
+                        'content' => __('None of the available payment gateways support purchasing recurring items.', 'invoicing'),
88 88
                         'type'    => 'danger',
89 89
                     ),
90 90
                     true
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             <?php
97 97
                 aui()->alert(
98 98
                     array(
99
-                        'content' => __( 'None of the available payment gateways support purchasing multiple subscriptions in a single order.', 'invoicing' ),
99
+                        'content' => __('None of the available payment gateways support purchasing multiple subscriptions in a single order.', 'invoicing'),
100 100
                         'type'    => 'danger',
101 101
                     ),
102 102
                     true
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             <?php
109 109
                 aui()->alert(
110 110
                     array(
111
-                        'content' => __( 'None of the available payment gateways support purchasing multiple subscriptions with different billing schedules in a single order.', 'invoicing' ),
111
+                        'content' => __('None of the available payment gateways support purchasing multiple subscriptions with different billing schedules in a single order.', 'invoicing'),
112 112
                         'type'    => 'danger',
113 113
                     ),
114 114
                     true
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             <?php
121 121
                 aui()->alert(
122 122
                     array(
123
-                        'content' => __( 'There is no active payment gateway available to process your request.', 'invoicing' ),
123
+                        'content' => __('There is no active payment gateway available to process your request.', 'invoicing'),
124 124
                         'type'    => 'danger',
125 125
                     ),
126 126
                     true
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             ?>
129 129
         </div>
130 130
 
131
-        <?php do_action( 'wpinv_payment_mode_bottom', $invoice_id, $chosen_gateway, $gateways, $form ); ?>
131
+        <?php do_action('wpinv_payment_mode_bottom', $invoice_id, $chosen_gateway, $gateways, $form); ?>
132 132
 
133 133
     </div>
134
-    <?php do_action( 'getpaid_after_payment_form_gateway_select', $form ); ?>
134
+    <?php do_action('getpaid_after_payment_form_gateway_select', $form); ?>
Please login to merge, or discard this patch.
templates/payment-forms/elements/paragraph.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-if ( ! empty( $element['text'] ) ) {
13
-    echo '<p>' . wp_kses_post( trim( $element['text'] ) ) . '</p>';
12
+if (!empty($element['text'])) {
13
+    echo '<p>' . wp_kses_post(trim($element['text'])) . '</p>';
14 14
 }
Please login to merge, or discard this patch.
templates/payment-forms/elements/heading.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-$heading_tag  = isset( $element['level'] ) ? trim( sanitize_key( $element['level'] ) ) : 'h3';
13
-$text = isset( $element['text'] ) ? trim( $element['text'] ) : '';
12
+$heading_tag = isset($element['level']) ? trim(sanitize_key($element['level'])) : 'h3';
13
+$text = isset($element['text']) ? trim($element['text']) : '';
14 14
 
15
-if ( ! empty( $text ) ) {
16
-    echo wp_kses_post( "<$heading_tag>$text</$heading_tag>" );
15
+if (!empty($text)) {
16
+    echo wp_kses_post("<$heading_tag>$text</$heading_tag>");
17 17
 }
Please login to merge, or discard this patch.
templates/emails/wpinv-email-footer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 // don't load directly
3
-if ( ! defined( 'ABSPATH' ) ) {
4
-    die( '-1' );
3
+if (!defined('ABSPATH')) {
4
+    die('-1');
5 5
 }
6 6
 
7
-$email_footer = apply_filters( 'wpinv_email_footer_text', wpinv_get_option( 'email_footer_text', get_bloginfo( 'name', 'display' ) . ' - ' . __( 'Powered by GetPaid', 'invoicing' ) ) );
8
-$email_footer = $email_footer ? wp_kses_post( wpautop( wptexturize( $email_footer ) ) ) : '';
7
+$email_footer = apply_filters('wpinv_email_footer_text', wpinv_get_option('email_footer_text', get_bloginfo('name', 'display') . ' - ' . __('Powered by GetPaid', 'invoicing')));
8
+$email_footer = $email_footer ? wp_kses_post(wpautop(wptexturize($email_footer))) : '';
9 9
 ?>
10 10
                                                             </div>
11 11
                                                         </td>
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
                                                 <table border="0" cellpadding="10" cellspacing="0" width="100%">
28 28
                                                     <tr>
29 29
                                                         <td colspan="2" valign="middle" id="credit">
30
-                                                            <?php echo wp_kses_post( $email_footer ); ?>
30
+                                                            <?php echo wp_kses_post($email_footer); ?>
31 31
                                                         </td>
32 32
                                                     </tr>
33 33
                                                 </table>
Please login to merge, or discard this patch.
templates/emails/invoice-totals.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -8,22 +8,22 @@  discard block
 block discarded – undo
8 8
  * @var WPInv_Invoice $invoice
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+defined('ABSPATH') || exit;
12 12
 
13 13
 // Totals rows.
14
-$totals = getpaid_invoice_totals_rows( $invoice );
14
+$totals = getpaid_invoice_totals_rows($invoice);
15 15
 
16
-do_action( 'getpaid_before_email_line_totals', $invoice, $totals );
16
+do_action('getpaid_before_email_line_totals', $invoice, $totals);
17 17
 
18 18
 ?>
19 19
 
20 20
 
21
-<?php if ( has_action( 'wpinv_email_footer_buttons' ) ) : ?>
21
+<?php if (has_action('wpinv_email_footer_buttons')) : ?>
22 22
 
23 23
     <tr class="wpinv_cart_footer_row">
24 24
 
25
-        <td colspan="<?php echo ( (int) $column_count ); ?>">
26
-            <?php do_action( 'wpinv_email_footer_buttons' ); ?>
25
+        <td colspan="<?php echo ((int) $column_count); ?>">
26
+            <?php do_action('wpinv_email_footer_buttons'); ?>
27 27
         </td>
28 28
 
29 29
     </tr>
@@ -31,44 +31,44 @@  discard block
 block discarded – undo
31 31
 <?php endif; ?>
32 32
 
33 33
 
34
-<?php foreach ( $totals as $key => $label ) : ?>
34
+<?php foreach ($totals as $key => $label) : ?>
35 35
 
36
-    <tr class="wpinv_cart_footer_row wpinv_cart_<?php echo esc_html( $key ); ?>_row">
36
+    <tr class="wpinv_cart_footer_row wpinv_cart_<?php echo esc_html($key); ?>_row">
37 37
 
38
-        <td colspan="<?php echo absint( ( $column_count - 1 ) ); ?>" class="wpinv_cart_<?php echo esc_html( $key ); ?>_label text-right">
39
-            <strong><?php echo esc_html( $label ); ?>:</strong>
38
+        <td colspan="<?php echo absint(($column_count - 1)); ?>" class="wpinv_cart_<?php echo esc_html($key); ?>_label text-right">
39
+            <strong><?php echo esc_html($label); ?>:</strong>
40 40
         </td>
41 41
 
42
-        <td class="wpinv_cart_<?php echo esc_html( $key ); ?> text-right">
42
+        <td class="wpinv_cart_<?php echo esc_html($key); ?> text-right">
43 43
 
44 44
             <?php
45 45
 
46 46
                 // Total tax.
47
-                if ( 'tax' == $key ) {
48
-                    wpinv_the_price( $invoice->get_total_tax(), $invoice->get_currency() );
47
+                if ('tax' == $key) {
48
+                    wpinv_the_price($invoice->get_total_tax(), $invoice->get_currency());
49 49
                 }
50 50
 
51
-                if ( 'fee' == $key ) {
52
-                    wpinv_the_price( $invoice->get_total_fees(), $invoice->get_currency() );
51
+                if ('fee' == $key) {
52
+                    wpinv_the_price($invoice->get_total_fees(), $invoice->get_currency());
53 53
                 }
54 54
 
55 55
                 // Total discount.
56
-                if ( 'discount' == $key ) {
57
-                    wpinv_the_price( $invoice->get_total_discount(), $invoice->get_currency() );
56
+                if ('discount' == $key) {
57
+                    wpinv_the_price($invoice->get_total_discount(), $invoice->get_currency());
58 58
                 }
59 59
 
60 60
                 // Sub total.
61
-                if ( 'subtotal' == $key ) {
62
-                    wpinv_the_price( $invoice->get_subtotal(), $invoice->get_currency() );
61
+                if ('subtotal' == $key) {
62
+                    wpinv_the_price($invoice->get_subtotal(), $invoice->get_currency());
63 63
                 }
64 64
 
65 65
                 // Total.
66
-                if ( 'total' == $key ) {
67
-                    wpinv_the_price( $invoice->get_total(), $invoice->get_currency() );
66
+                if ('total' == $key) {
67
+                    wpinv_the_price($invoice->get_total(), $invoice->get_currency());
68 68
                 }
69 69
 
70 70
                 // Fires when printing a cart total in an email.
71
-                do_action( "getpaid_email_cart_totals_$key", $invoice );
71
+                do_action("getpaid_email_cart_totals_$key", $invoice);
72 72
 
73 73
             ?>
74 74
 
@@ -80,4 +80,4 @@  discard block
 block discarded – undo
80 80
 
81 81
 <?php
82 82
 
83
-    do_action( 'getpaid_after_email_line_totals', $invoice, $totals );
83
+    do_action('getpaid_after_email_line_totals', $invoice, $totals);
Please login to merge, or discard this patch.
templates/emails/invoice-item.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -30,40 +30,40 @@
 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
-					echo "<p class='small'>" . wp_kses_post( $description ) . "</p>";
39
+                if ( ! empty( $description ) ) {
40
+                    echo "<p class='small'>" . wp_kses_post( $description ) . "</p>";
41 41
                     }
42 42
 }
43 43
 
44 44
                 // Item price.
45 45
                 if ( 'price' == $column ) {
46 46
 
47
-				// Display the item price (or recurring price if this is a renewal invoice)
48
-				$price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
49
-				wpinv_the_price( $price, $invoice->get_currency() );
47
+                // Display the item price (or recurring price if this is a renewal invoice)
48
+                $price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
49
+                wpinv_the_price( $price, $invoice->get_currency() );
50 50
 
51 51
                 }
52 52
 
53 53
                 // Item quantity.
54 54
                 if ( 'quantity' == $column ) {
55
-				echo (float) $item->get_quantity();
55
+                echo (float) $item->get_quantity();
56 56
                 }
57 57
 
58 58
                 // Tax rate.
59 59
                 if ( 'tax_rate' == $column ) {
60
-				echo floatval( round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) ) . '%';
60
+                echo floatval( round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) ) . '%';
61 61
                 }
62 62
 
63 63
                 // Item sub total.
64 64
                 if ( 'subtotal' == $column ) {
65
-				$subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
66
-				wpinv_the_price( $subtotal, $invoice->get_currency() );
65
+                $subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
66
+                wpinv_the_price( $subtotal, $invoice->get_currency() );
67 67
                 }
68 68
 
69 69
                 // Fires when printing a line item column.
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -10,64 +10,64 @@  discard block
 block discarded – undo
10 10
  * @var array $columns
11 11
  */
12 12
 
13
-defined( 'ABSPATH' ) || exit;
13
+defined('ABSPATH') || exit;
14 14
 
15 15
 ?>
16 16
 
17
-<?php do_action( 'getpaid_before_email_line_item', $invoice, $item ); ?>
17
+<?php do_action('getpaid_before_email_line_item', $invoice, $item); ?>
18 18
 
19
-<tr class="wpinv_cart_item item-type-<?php echo esc_attr( $item->get_type() ); ?>">
19
+<tr class="wpinv_cart_item item-type-<?php echo esc_attr($item->get_type()); ?>">
20 20
 
21
-    <?php foreach ( array_keys( $columns ) as $column ) : ?>
21
+    <?php foreach (array_keys($columns) as $column) : ?>
22 22
 
23
-        <td class="<?php echo 'name' == $column ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo esc_attr( $column ); ?>">
23
+        <td class="<?php echo 'name' == $column ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo esc_attr($column); ?>">
24 24
             
25 25
             <?php
26 26
 
27 27
                 // Fires before printing a line item column.
28
-                do_action( "getpaid_email_line_item_before_$column", $item, $invoice );
28
+                do_action("getpaid_email_line_item_before_$column", $item, $invoice);
29 29
 
30 30
                 // Item name.
31
-                if ( 'name' == $column ) {
31
+                if ('name' == $column) {
32 32
 
33 33
 				// Display the name.
34
-				echo '<div class="wpinv_email_cart_item_title">' . esc_html( $item->get_name() ) . '</div>';
34
+				echo '<div class="wpinv_email_cart_item_title">' . esc_html($item->get_name()) . '</div>';
35 35
 
36 36
 				// And an optional description.
37 37
 				$description = $item->get_description();
38 38
 
39
-				if ( ! empty( $description ) ) {
40
-					echo "<p class='small'>" . wp_kses_post( $description ) . "</p>";
39
+				if (!empty($description)) {
40
+					echo "<p class='small'>" . wp_kses_post($description) . "</p>";
41 41
                     }
42 42
 }
43 43
 
44 44
                 // Item price.
45
-                if ( 'price' == $column ) {
45
+                if ('price' == $column) {
46 46
 
47 47
 				// Display the item price (or recurring price if this is a renewal invoice)
48 48
 				$price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
49
-				wpinv_the_price( $price, $invoice->get_currency() );
49
+				wpinv_the_price($price, $invoice->get_currency());
50 50
 
51 51
                 }
52 52
 
53 53
                 // Item quantity.
54
-                if ( 'quantity' == $column ) {
54
+                if ('quantity' == $column) {
55 55
 				echo (float) $item->get_quantity();
56 56
                 }
57 57
 
58 58
                 // Tax rate.
59
-                if ( 'tax_rate' == $column ) {
60
-				echo floatval( round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) ) . '%';
59
+                if ('tax_rate' == $column) {
60
+				echo floatval(round(getpaid_get_invoice_tax_rate($invoice, $item), 2)) . '%';
61 61
                 }
62 62
 
63 63
                 // Item sub total.
64
-                if ( 'subtotal' == $column ) {
64
+                if ('subtotal' == $column) {
65 65
 				$subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
66
-				wpinv_the_price( $subtotal, $invoice->get_currency() );
66
+				wpinv_the_price($subtotal, $invoice->get_currency());
67 67
                 }
68 68
 
69 69
                 // Fires when printing a line item column.
70
-                do_action( "getpaid_email_line_item_$column", $item, $invoice );
70
+                do_action("getpaid_email_line_item_$column", $item, $invoice);
71 71
 
72 72
             ?>
73 73
 
@@ -77,4 +77,4 @@  discard block
 block discarded – undo
77 77
 
78 78
 </tr>
79 79
 
80
-<?php do_action( 'getpaid_after_email_line_item', $invoice, $item ); ?>
80
+<?php do_action('getpaid_after_email_line_item', $invoice, $item); ?>
Please login to merge, or discard this patch.