Passed
Push — master ( 3bc955...30a2aa )
by Brian
08:45 queued 03:07
created
templates/invoice/billing-address.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -7,10 +7,10 @@  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
-$invoice     = new WPInv_Invoice( $invoice );
13
-$address_row = wpinv_get_invoice_address_markup( $invoice->get_user_info() );
12
+$invoice     = new WPInv_Invoice($invoice);
13
+$address_row = wpinv_get_invoice_address_markup($invoice->get_user_info());
14 14
 $phone       = $invoice->get_phone();
15 15
 $email       = $invoice->get_email();
16 16
 $vat_number  = $invoice->get_vat_number();
@@ -22,47 +22,47 @@  discard block
 block discarded – undo
22 22
 
23 23
 
24 24
             <div class="invoice-billing-address-label col-2">
25
-                <strong><?php esc_html_e( 'To:', 'invoicing' ); ?></strong>
25
+                <strong><?php esc_html_e('To:', 'invoicing'); ?></strong>
26 26
             </div>
27 27
 
28 28
 
29 29
             <div class="invoice-billing-address-value col-10">
30 30
 
31
-                <?php do_action( 'getpaid_billing_address_top' ); ?>
31
+                <?php do_action('getpaid_billing_address_top'); ?>
32 32
 
33
-                <?php if ( ! empty( $address_row ) ) : ?>
33
+                <?php if (!empty($address_row)) : ?>
34 34
                     <div class="billing-address">
35
-                        <?php echo wp_kses_post( $address_row ); ?>
35
+                        <?php echo wp_kses_post($address_row); ?>
36 36
                     </div>
37 37
                 <?php endif; ?>
38 38
 
39 39
 
40
-                <?php if ( ! empty( $phone ) ) : ?>
40
+                <?php if (!empty($phone)) : ?>
41 41
                     <div class="billing-phone">
42
-                        <?php echo wp_sprintf( esc_html__( 'Phone: %s', 'invoicing' ), esc_html( $phone ) ); ?>
42
+                        <?php echo wp_sprintf(esc_html__('Phone: %s', 'invoicing'), esc_html($phone)); ?>
43 43
                     </div>
44 44
                 <?php endif; ?>
45 45
 
46 46
 
47
-                <?php if ( ! empty( $email ) ) : ?>
47
+                <?php if (!empty($email)) : ?>
48 48
                     <div class="billing-email">
49
-                        <?php echo wp_sprintf( esc_html__( 'Email: %s', 'invoicing' ), esc_html( $email ) ); ?>
49
+                        <?php echo wp_sprintf(esc_html__('Email: %s', 'invoicing'), esc_html($email)); ?>
50 50
                     </div>
51 51
                 <?php endif; ?>
52 52
 
53
-                <?php if ( ! empty( $vat_number ) ) : ?>
53
+                <?php if (!empty($vat_number)) : ?>
54 54
                     <div class="vat-number">
55
-                        <?php echo wp_sprintf( esc_html__( 'Vat Number: %s', 'invoicing' ), esc_html( $vat_number ) ); ?>
55
+                        <?php echo wp_sprintf(esc_html__('Vat Number: %s', 'invoicing'), esc_html($vat_number)); ?>
56 56
                     </div>
57 57
                 <?php endif; ?>
58 58
 
59
-                <?php if ( ! empty( $company_id ) ) : ?>
59
+                <?php if (!empty($company_id)) : ?>
60 60
                     <div class="company-id">
61
-                        <?php echo wp_sprintf( esc_html__( 'Company ID: %s', 'invoicing' ), esc_html( $company_id ) ); ?>
61
+                        <?php echo wp_sprintf(esc_html__('Company ID: %s', 'invoicing'), esc_html($company_id)); ?>
62 62
                     </div>
63 63
                 <?php endif; ?>
64 64
 
65
-                <?php do_action( 'getpaid_billing_address_bottom' ); ?>
65
+                <?php do_action('getpaid_billing_address_bottom'); ?>
66 66
 
67 67
             </div>
68 68
 
Please login to merge, or discard this patch.
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/payment-forms/cart-totals.php 2 patches
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
-								wpinv_the_price( 0, $currency );
67
-								}
64
+                                // Total tax.
65
+                                if ( in_array( $key, array( 'tax', 'discount', 'subtotal', 'total', 'fees' ) ) ) {
66
+                                wpinv_the_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.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@  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
 // Totals rows.
13 13
 $totals = apply_filters(
14 14
 	'getpaid_payment_form_cart_table_totals',
15 15
 	array(
16
-		'subtotal' => __( 'Subtotal', 'invoicing' ),
17
-		'tax'      => __( 'Tax', 'invoicing' ),
18
-		'fees'     => __( 'Fee', 'invoicing' ),
19
-		'discount' => __( 'Discount', 'invoicing' ),
20
-		'total'    => __( 'Total', 'invoicing' ),
16
+		'subtotal' => __('Subtotal', 'invoicing'),
17
+		'tax'      => __('Tax', 'invoicing'),
18
+		'fees'     => __('Fee', 'invoicing'),
19
+		'discount' => __('Discount', 'invoicing'),
20
+		'total'    => __('Total', 'invoicing'),
21 21
 	),
22 22
 	$form
23 23
 );
@@ -25,15 +25,15 @@  discard block
 block discarded – undo
25 25
 $currency = $form->get_currency();
26 26
 $country  = wpinv_get_default_country();
27 27
 
28
-if ( ! empty( $form->invoice ) ) {
29
-	$country  = $form->invoice->get_country();
28
+if (!empty($form->invoice)) {
29
+	$country = $form->invoice->get_country();
30 30
 }
31 31
 
32
-if ( ! wpinv_use_taxes() && isset( $totals['tax'] ) ) {
33
-	unset( $totals['tax'] );
32
+if (!wpinv_use_taxes() && isset($totals['tax'])) {
33
+	unset($totals['tax']);
34 34
 }
35 35
 
36
-do_action( 'getpaid_before_payment_form_cart_totals', $form, $totals );
36
+do_action('getpaid_before_payment_form_cart_totals', $form, $totals);
37 37
 
38 38
 ?>
39 39
 <style>
@@ -47,26 +47,26 @@  discard block
 block discarded – undo
47 47
 	<div class="row">
48 48
 		<div class="col-12 offset-sm-6 col-sm-6 border-sm-left pl-sm-0">
49 49
 
50
-			<?php foreach ( $totals as $key => $label ) : ?>
50
+			<?php foreach ($totals as $key => $label) : ?>
51 51
 
52
-				<div class="getpaid-form-cart-totals-col getpaid-form-cart-totals-<?php echo esc_attr( $key ); ?> font-weight-bold py-2 px-3 <?php echo 'total' == $key ? 'bg-light' : 'border-bottom'; ?>">
52
+				<div class="getpaid-form-cart-totals-col getpaid-form-cart-totals-<?php echo esc_attr($key); ?> font-weight-bold py-2 px-3 <?php echo 'total' == $key ? 'bg-light' : 'border-bottom'; ?>">
53 53
 
54 54
 					<div class="form-row row">
55 55
 
56 56
 						<div class="col-8 pl-sm-0 getpaid-payment-form-line-totals-label">
57
-							<?php echo esc_html( $label ); ?>
57
+							<?php echo esc_html($label); ?>
58 58
 						</div>
59 59
 
60
-						<div class="col-4 getpaid-payment-form-line-totals-value getpaid-form-cart-totals-total-<?php echo esc_attr( $key ); ?>">
60
+						<div class="col-4 getpaid-payment-form-line-totals-value getpaid-form-cart-totals-total-<?php echo esc_attr($key); ?>">
61 61
 
62 62
 							<?php
63 63
 
64 64
 								// Total tax.
65
-								if ( in_array( $key, array( 'tax', 'discount', 'subtotal', 'total', 'fees' ) ) ) {
66
-								wpinv_the_price( 0, $currency );
65
+								if (in_array($key, array('tax', 'discount', 'subtotal', 'total', 'fees'))) {
66
+								wpinv_the_price(0, $currency);
67 67
 								}
68 68
 
69
-								do_action( "getpaid_payment_form_cart_totals_$key", $form );
69
+								do_action("getpaid_payment_form_cart_totals_$key", $form);
70 70
 							?>
71 71
 
72 72
 						</div>
@@ -82,4 +82,4 @@  discard block
 block discarded – undo
82 82
 </div>
83 83
 
84 84
 <?php
85
-do_action( 'getpaid_payment_form_cart_totals', $form, $totals );
85
+do_action('getpaid_payment_form_cart_totals', $form, $totals);
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.