Passed
Push — master ( 29dccc...57b45a )
by Brian
05:48
created
templates/invoice/company-address.php 1 patch
Spacing   +15 added lines, -15 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
 // Prepare the company name.
13
-$company_name = wpinv_get_option( 'vat_company_name' );
13
+$company_name = wpinv_get_option('vat_company_name');
14 14
 
15
-if ( empty( $company_name ) ) {
15
+if (empty($company_name)) {
16 16
     $company_name = wpinv_get_business_name();
17 17
 }
18 18
 
19 19
 // Prepare the VAT number.
20
-$vat_number = wpinv_get_option( 'vat_number' );
20
+$vat_number = wpinv_get_option('vat_number');
21 21
 
22 22
 ?>
23 23
     <div class="getpaid-company-address form-group">
@@ -25,36 +25,36 @@  discard block
 block discarded – undo
25 25
         <div class="row">
26 26
 
27 27
             <div class="invoice-company-address-label col-2">
28
-                <strong><?php _e( 'From:', 'invoicing' ) ?></strong>
28
+                <strong><?php _e('From:', 'invoicing') ?></strong>
29 29
             </div>
30 30
 
31 31
             <div class="invoice-company-address-value col-10">
32 32
 
33
-                <?php do_action( 'getpaid_company_address_top' ); ?>
33
+                <?php do_action('getpaid_company_address_top'); ?>
34 34
 
35 35
                 <div class="name">
36
-                    <a target="_blank" class="text-dark" href="<?php echo esc_url( wpinv_get_business_website() ); ?>">
37
-                        <?php echo esc_html( $company_name ); ?>
36
+                    <a target="_blank" class="text-dark" href="<?php echo esc_url(wpinv_get_business_website()); ?>">
37
+                        <?php echo esc_html($company_name); ?>
38 38
                     </a>
39 39
                 </div>
40 40
 
41
-                <?php if ( $address = wpinv_get_business_address() ) { ?>
42
-                    <?php echo $address;?>
41
+                <?php if ($address = wpinv_get_business_address()) { ?>
42
+                    <?php echo $address; ?>
43 43
                 <?php } ?>
44 44
 
45
-                <?php if ( $email_from = wpinv_mail_get_from_address() ) { ?>
45
+                <?php if ($email_from = wpinv_mail_get_from_address()) { ?>
46 46
                     <div class="email_from">
47
-                        <?php echo wp_sprintf( __( 'Email: %s', 'invoicing' ), $email_from );?>
47
+                        <?php echo wp_sprintf(__('Email: %s', 'invoicing'), $email_from); ?>
48 48
                     </div>
49 49
                 <?php } ?>
50 50
 
51
-                <?php if ( ! empty( $vat_number ) ) { ?>
51
+                <?php if (!empty($vat_number)) { ?>
52 52
                     <div class="email_from">
53
-                        <?php echo wp_sprintf( __( 'VAT Number: %s', 'invoicing' ), esc_html( $vat_number ) );?>
53
+                        <?php echo wp_sprintf(__('VAT Number: %s', 'invoicing'), esc_html($vat_number)); ?>
54 54
                     </div>
55 55
                 <?php } ?>
56 56
 
57
-                <?php do_action( 'getpaid_company_address_bottom' ); ?>
57
+                <?php do_action('getpaid_company_address_bottom'); ?>
58 58
 
59 59
             </div>
60 60
 
Please login to merge, or discard this patch.
templates/invoice/line-item.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -10,55 +10,55 @@  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
-do_action( 'getpaid_before_invoice_line_item', $invoice, $item );
15
+do_action('getpaid_before_invoice_line_item', $invoice, $item);
16 16
 
17 17
 ?>
18 18
 
19
-<div class='getpaid-invoice-item item-<?php echo (int) $item->get_id(); ?> item-type-<?php echo sanitize_html_class( $item->get_type() ); ?> border-bottom'>
19
+<div class='getpaid-invoice-item item-<?php echo (int) $item->get_id(); ?> item-type-<?php echo sanitize_html_class($item->get_type()); ?> border-bottom'>
20 20
 
21 21
     <div class="form-row">
22 22
 
23
-        <?php foreach ( array_keys( $columns ) as $column ): ?>
23
+        <?php foreach (array_keys($columns) as $column): ?>
24 24
 
25
-            <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-item-<?php echo sanitize_html_class( $column ); ?>">
25
+            <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-item-<?php echo sanitize_html_class($column); ?>">
26 26
 
27 27
                 <?php
28 28
 
29 29
                     // Fires before printing a line item column.
30
-                    do_action( "getpaid_invoice_line_item_before_$column", $item, $invoice );
30
+                    do_action("getpaid_invoice_line_item_before_$column", $item, $invoice);
31 31
 
32 32
                     // Item name.
33
-                    if ( 'name' == $column ) {
33
+                    if ('name' == $column) {
34 34
 
35 35
                         // Display the name.
36
-                        echo '<div class="mb-1">' . esc_html( $item->get_name() ) . '</div>';
36
+                        echo '<div class="mb-1">' . esc_html($item->get_name()) . '</div>';
37 37
 
38 38
                         // And an optional description.
39 39
                         $description = $item->get_description();
40 40
 
41
-                        if ( ! empty( $description ) ) {
42
-                            $description = wp_kses_post( $description );
41
+                        if (!empty($description)) {
42
+                            $description = wp_kses_post($description);
43 43
                             echo "<small class='form-text text-muted pr-2 m-0'>$description</small>";
44 44
                         }
45 45
 
46 46
                         // Fires before printing the line item actions.
47
-                        do_action( "getpaid_before_invoice_line_item_actions", $item, $invoice );
47
+                        do_action("getpaid_before_invoice_line_item_actions", $item, $invoice);
48 48
 
49
-                        $actions = apply_filters( 'getpaid-invoice-page-line-item-actions', array(), $item, $invoice );
49
+                        $actions = apply_filters('getpaid-invoice-page-line-item-actions', array(), $item, $invoice);
50 50
 
51
-                        if ( ! empty( $actions ) ) {
51
+                        if (!empty($actions)) {
52 52
 
53
-                            $sanitized  = array();
54
-                            foreach ( $actions as $key => $action ) {
55
-                                $key         = sanitize_html_class( $key );
56
-                                $action      = wp_kses_post( $action );
53
+                            $sanitized = array();
54
+                            foreach ($actions as $key => $action) {
55
+                                $key         = sanitize_html_class($key);
56
+                                $action      = wp_kses_post($action);
57 57
                                 $sanitized[] = "<span class='$key'>$action</span>";
58 58
                             }
59 59
 
60 60
                             echo "<small class='form-text getpaid-line-item-actions'>";
61
-                            echo implode( ' | ', $sanitized );
61
+                            echo implode(' | ', $sanitized);
62 62
                             echo '</small>';
63 63
 
64 64
                         }
@@ -66,35 +66,35 @@  discard block
 block discarded – undo
66 66
                     }
67 67
 
68 68
                     // Item price.
69
-                    if ( 'price' == $column ) {
69
+                    if ('price' == $column) {
70 70
 
71 71
                         // Display the item price (or recurring price if this is a renewal invoice)
72 72
                         $price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
73
-                        echo wpinv_price( $price, $invoice->get_currency() );
73
+                        echo wpinv_price($price, $invoice->get_currency());
74 74
 
75 75
                     }
76 76
 
77 77
                     // Tax rate.
78
-                    if ( 'tax_rate' == $column ) {
79
-                        echo round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) . '%';
78
+                    if ('tax_rate' == $column) {
79
+                        echo round(getpaid_get_invoice_tax_rate($invoice, $item), 2) . '%';
80 80
                     }
81 81
 
82 82
                     // Item quantity.
83
-                    if ( 'quantity' == $column ) {
83
+                    if ('quantity' == $column) {
84 84
                         echo (float) $item->get_quantity();
85 85
                     }
86 86
 
87 87
                     // Item sub total.
88
-                    if ( 'subtotal' == $column ) {
88
+                    if ('subtotal' == $column) {
89 89
                         $subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
90
-                        echo wpinv_price( $subtotal, $invoice->get_currency() );
90
+                        echo wpinv_price($subtotal, $invoice->get_currency());
91 91
                     }
92 92
 
93 93
                     // Fires when printing a line item column.
94
-                    do_action( "getpaid_invoice_line_item_$column", $item, $invoice );
94
+                    do_action("getpaid_invoice_line_item_$column", $item, $invoice);
95 95
 
96 96
                     // Fires after printing a line item column.
97
-                    do_action( "getpaid_invoice_line_item_after_$column", $item, $invoice );
97
+                    do_action("getpaid_invoice_line_item_after_$column", $item, $invoice);
98 98
 
99 99
                 ?>
100 100
 
Please login to merge, or discard this patch.
templates/invoice/billing-address.php 1 patch
Spacing   +15 added lines, -15 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 _e( 'To:', 'invoicing' ) ?></strong>
25
+                <strong><?php _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 35
                         <?php echo $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( __( 'Phone: %s', 'invoicing' ), esc_html( $phone ) ); ?>
42
+                        <?php echo wp_sprintf(__('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( __( 'Email: %s', 'invoicing' ), sanitize_email( $email ) ); ?>
49
+                        <?php echo wp_sprintf(__('Email: %s', 'invoicing'), sanitize_email($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( __( 'Vat Number: %s', 'invoicing' ), esc_html( $vat_number ) ); ?>
55
+                        <?php echo wp_sprintf(__('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( __( 'Company ID: %s', 'invoicing' ), esc_html( $company_id ) ); ?>
61
+                        <?php echo wp_sprintf(__('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/line-items.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,21 +8,21 @@  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
 
15
-<?php do_action( 'getpaid_invoice_before_line_items', $invoice ); ?>
15
+<?php do_action('getpaid_invoice_before_line_items', $invoice); ?>
16 16
 
17
-    <h2 class="mt-5 mb-1 h4"><?php echo sprintf( esc_html__( '%s Items', 'invoicing' ), ucfirst( $invoice->get_invoice_quote_type() )); ?></h2>
17
+    <h2 class="mt-5 mb-1 h4"><?php echo sprintf(esc_html__('%s Items', 'invoicing'), ucfirst($invoice->get_invoice_quote_type())); ?></h2>
18 18
     <div class="getpaid-invoice-items mb-4 border">
19 19
 
20 20
 
21
-        <div class="getpaid-invoice-items-header <?php echo sanitize_html_class( $invoice->get_template() ); ?>">
21
+        <div class="getpaid-invoice-items-header <?php echo sanitize_html_class($invoice->get_template()); ?>">
22 22
             <div class="form-row">
23
-                <?php foreach ( $columns as $key => $label ) : ?>
24
-                    <div class="<?php echo 'name' == $key ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-line-item-col-<?php echo esc_attr( $key ); ?>">
25
-                        <?php echo esc_html( $label ); ?>
23
+                <?php foreach ($columns as $key => $label) : ?>
24
+                    <div class="<?php echo 'name' == $key ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-line-item-col-<?php echo esc_attr($key); ?>">
25
+                        <?php echo esc_html($label); ?>
26 26
                     </div>
27 27
                 <?php endforeach; ?>
28 28
             </div>
@@ -32,20 +32,20 @@  discard block
 block discarded – undo
32 32
         <?php
33 33
 
34 34
             // Display the item totals.
35
-            foreach ( $invoice->get_items() as $item ) {
36
-                wpinv_get_template( 'invoice/line-item.php', compact( 'invoice', 'item', 'columns' ) );
35
+            foreach ($invoice->get_items() as $item) {
36
+                wpinv_get_template('invoice/line-item.php', compact('invoice', 'item', 'columns'));
37 37
             }
38 38
 
39 39
             // Display the fee totals.
40
-            foreach ( $invoice->get_fees() as $fee ) {
41
-                wpinv_get_template( 'invoice/fee-item.php', compact( 'invoice', 'fee', 'columns' ) );
40
+            foreach ($invoice->get_fees() as $fee) {
41
+                wpinv_get_template('invoice/fee-item.php', compact('invoice', 'fee', 'columns'));
42 42
             }
43 43
 
44 44
             // Display the cart totals.
45
-            wpinv_get_template( 'invoice/line-totals.php', compact( 'invoice' ) );
45
+            wpinv_get_template('invoice/line-totals.php', compact('invoice'));
46 46
 
47 47
         ?>
48 48
 
49 49
     </div>
50 50
 
51
-<?php do_action( 'getpaid_invoice_after_line_items', $invoice ); ?>
51
+<?php do_action('getpaid_invoice_after_line_items', $invoice); ?>
Please login to merge, or discard this patch.
templates/invoice/invoice-meta.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -7,50 +7,50 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-$class = ! is_singular( 'page' ) ? 'px-1' : '';
12
+$class = !is_singular('page') ? 'px-1' : '';
13 13
 ?>
14 14
 
15
-        <?php do_action( 'getpaid_before_invoice_meta', $invoice ); ?>
15
+        <?php do_action('getpaid_before_invoice_meta', $invoice); ?>
16 16
         <div class="getpaid-invoice-meta-data">
17 17
 
18
-            <?php do_action( 'getpaid_before_invoice_meta_table', $invoice ); ?>
18
+            <?php do_action('getpaid_before_invoice_meta_table', $invoice); ?>
19 19
             <table class="table table-bordered">
20 20
                 <tbody>
21 21
 
22
-                    <?php do_action( "getpaid_before_invoice_meta_rows", $invoice ); ?>
23
-                    <?php foreach ( $meta as $key => $data ) : ?>
22
+                    <?php do_action("getpaid_before_invoice_meta_rows", $invoice); ?>
23
+                    <?php foreach ($meta as $key => $data) : ?>
24 24
 
25
-                        <?php if ( ! empty( $data['value'] ) ) : ?>
25
+                        <?php if (!empty($data['value'])) : ?>
26 26
 
27
-                            <?php do_action( "getpaid_before_invoice_meta_$key", $invoice, $data ); ?>
27
+                            <?php do_action("getpaid_before_invoice_meta_$key", $invoice, $data); ?>
28 28
 
29
-                            <tr class="getpaid-invoice-meta-<?php echo sanitize_html_class( $key ); ?>">
29
+                            <tr class="getpaid-invoice-meta-<?php echo sanitize_html_class($key); ?>">
30 30
 
31 31
                                 <th class="<?php echo $class; ?> font-weight-bold" style="width: 40%">
32
-                                    <?php echo esc_html( $data['label'] ); ?>
32
+                                    <?php echo esc_html($data['label']); ?>
33 33
                                 </th>
34 34
 
35 35
                                 <td class="<?php echo $class; ?> <?php echo $key == 'invoice_total' ? 'font-weight-bold' : 'font-weight-normal'; ?> text-break" style="width: 60%">
36
-                                    <span class="getpaid-invoice-meta-<?php echo sanitize_html_class( $key ); ?>-value"><?php echo wp_kses_post( $data['value'] ); ?></span>
36
+                                    <span class="getpaid-invoice-meta-<?php echo sanitize_html_class($key); ?>-value"><?php echo wp_kses_post($data['value']); ?></span>
37 37
                                 </td>
38 38
 
39 39
                             </tr>
40 40
 
41
-                            <?php do_action( "getpaid_after_invoice_meta_$key", $invoice, $data ); ?>
41
+                            <?php do_action("getpaid_after_invoice_meta_$key", $invoice, $data); ?>
42 42
 
43 43
                         <?php endif; ?>
44 44
                     
45 45
                     <?php endforeach; ?>
46
-                    <?php do_action( "getpaid_after_invoice_meta_rows", $invoice ); ?>
46
+                    <?php do_action("getpaid_after_invoice_meta_rows", $invoice); ?>
47 47
 
48 48
                 </tbody>
49 49
             </table>
50
-            <?php do_action( 'getpaid_after_invoice_meta_table', $invoice ); ?>
50
+            <?php do_action('getpaid_after_invoice_meta_table', $invoice); ?>
51 51
 
52 52
 
53 53
         </div>
54
-        <?php do_action( 'getpaid_after_invoice_meta', $invoice ); ?>
54
+        <?php do_action('getpaid_after_invoice_meta', $invoice); ?>
55 55
 
56 56
 <?php
Please login to merge, or discard this patch.
templates/invoice/line-totals.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -9,26 +9,26 @@  discard block
 block discarded – undo
9 9
  * @var WPInv_Invoice $invoice
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) || exit;
12
+defined('ABSPATH') || exit;
13 13
 
14 14
 // Totals rows.
15
-$totals = getpaid_invoice_totals_rows( $invoice );
15
+$totals = getpaid_invoice_totals_rows($invoice);
16 16
 
17
-do_action( 'getpaid_before_invoice_line_totals', $invoice, $totals );
17
+do_action('getpaid_before_invoice_line_totals', $invoice, $totals);
18 18
 
19 19
 ?>
20 20
 <div class='getpaid-invoice-line-totals'>
21 21
     <div class="row">
22 22
         <div class="col-12 offset-sm-6 col-sm-6 border-sm-left pl-sm-0">
23 23
 
24
-            <?php foreach ( $totals as $key => $label ) : ?>
24
+            <?php foreach ($totals as $key => $label) : ?>
25 25
 
26
-                <div class="getpaid-invoice-line-totals-col <?php echo sanitize_html_class( $key ); ?>">
26
+                <div class="getpaid-invoice-line-totals-col <?php echo sanitize_html_class($key); ?>">
27 27
 
28 28
                     <div class="form-row">
29 29
 
30 30
                         <div class="col-8 getpaid-invoice-line-totals-label">
31
-                            <?php echo esc_html( $label ); ?>
31
+                            <?php echo esc_html($label); ?>
32 32
                         </div>
33 33
 
34 34
                         <div class="col-4 getpaid-invoice-line-totals-value pl-0">
@@ -36,15 +36,15 @@  discard block
 block discarded – undo
36 36
                             <?php
37 37
 
38 38
                                 // Total tax.
39
-                                if ( 'tax' == $key ) {
40
-                                    echo wpinv_price( $invoice->get_total_tax(), $invoice->get_currency() );
39
+                                if ('tax' == $key) {
40
+                                    echo wpinv_price($invoice->get_total_tax(), $invoice->get_currency());
41 41
 
42
-                                    if ( wpinv_use_taxes() && ! $invoice->get_disable_taxes() ) {
42
+                                    if (wpinv_use_taxes() && !$invoice->get_disable_taxes()) {
43 43
 
44 44
                                         $taxes = $invoice->get_total_tax();
45
-                                        if ( empty( $taxes ) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction( $invoice->get_country() ) ) {
45
+                                        if (empty($taxes) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction($invoice->get_country())) {
46 46
                                             echo ' <em class="text-muted small">';
47
-                                            _x( '(Reverse charged)','This is a legal term for reverse charging tax in the EU', 'invoicing' );
47
+                                            _x('(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing');
48 48
                                             echo '</em>';
49 49
                                         }
50 50
 
@@ -53,27 +53,27 @@  discard block
 block discarded – undo
53 53
                                 }
54 54
 
55 55
                                 // Total Fee.
56
-                                if ( 'fee' == $key ) {
57
-                                    echo wpinv_price( $invoice->get_total_fees(), $invoice->get_currency() );
56
+                                if ('fee' == $key) {
57
+                                    echo wpinv_price($invoice->get_total_fees(), $invoice->get_currency());
58 58
                                 }
59 59
 
60 60
                                 // Total discount.
61
-                                if ( 'discount' == $key ) {
62
-                                    echo wpinv_price( $invoice->get_total_discount(), $invoice->get_currency() );
61
+                                if ('discount' == $key) {
62
+                                    echo wpinv_price($invoice->get_total_discount(), $invoice->get_currency());
63 63
                                 }
64 64
 
65 65
                                 // Sub total.
66
-                                if ( 'subtotal' == $key ) {
67
-                                    echo wpinv_price( $invoice->get_subtotal(), $invoice->get_currency() );
66
+                                if ('subtotal' == $key) {
67
+                                    echo wpinv_price($invoice->get_subtotal(), $invoice->get_currency());
68 68
                                 }
69 69
 
70 70
                                 // Total.
71
-                                if ( 'total' == $key ) {
72
-                                    echo wpinv_price( $invoice->get_total(), $invoice->get_currency() );
71
+                                if ('total' == $key) {
72
+                                    echo wpinv_price($invoice->get_total(), $invoice->get_currency());
73 73
                                 }
74 74
  
75 75
                                 // Fires when printing a cart total.
76
-                                do_action( "getpaid_invoice_cart_totals_$key", $invoice );
76
+                                do_action("getpaid_invoice_cart_totals_$key", $invoice);
77 77
 
78 78
                             ?>
79 79
 
@@ -87,4 +87,4 @@  discard block
 block discarded – undo
87 87
     </div>
88 88
 </div> <!-- end .getpaid-invoice-line-totals -->
89 89
 
90
-<?php do_action(  'getpaid_after_invoice_line_totals', $invoice, $totals ); ?>
90
+<?php do_action('getpaid_after_invoice_line_totals', $invoice, $totals); ?>
Please login to merge, or discard this patch.
templates/invoice/fee-item.php 1 patch
Spacing   +20 added lines, -20 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,66 +19,66 @@  discard block
 block discarded – undo
19 19
 
20 20
     <div class="form-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 sanitize_html_class( $column ); ?>">
24
+            <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-item-<?php echo sanitize_html_class($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'] );
38
+                        $description = empty($fee['description']) ? esc_html__('Fee', 'invoicing') : esc_html($fee['description']);
39 39
                         echo "<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
-                            echo wpinv_price( $fee['recurring_fee'], $invoice->get_currency() );
47
+                        if ($invoice->is_recurring() && $invoice->is_renewal()) {
48
+                            echo wpinv_price($fee['recurring_fee'], $invoice->get_currency());
49 49
                         } else {
50
-                            echo wpinv_price( $fee['initial_fee'], $invoice->get_currency() );
50
+                            echo wpinv_price($fee['initial_fee'], $invoice->get_currency());
51 51
                         }
52 52
 
53 53
                     }
54 54
 
55 55
                     // Item quantity.
56
-                    if ( 'quantity' == $column ) {
56
+                    if ('quantity' == $column) {
57 57
                         echo "&mdash;";
58 58
                     }
59 59
 
60 60
                     // Item tax.
61
-                    if ( 'tax_rate' == $column ) {
61
+                    if ('tax_rate' == $column) {
62 62
                         echo "&mdash;";
63 63
                     }
64 64
 
65 65
                     // Item sub total.
66
-                    if ( 'subtotal' == $column ) {
66
+                    if ('subtotal' == $column) {
67 67
 
68 68
                         // Display the item price (or recurring price if this is a renewal invoice)
69
-                        if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
70
-                            echo wpinv_price( $fee['recurring_fee'], $invoice->get_currency() );
69
+                        if ($invoice->is_recurring() && $invoice->is_renewal()) {
70
+                            echo wpinv_price($fee['recurring_fee'], $invoice->get_currency());
71 71
                         } else {
72
-                            echo wpinv_price( $fee['initial_fee'], $invoice->get_currency() );
72
+                            echo wpinv_price($fee['initial_fee'], $invoice->get_currency());
73 73
                         }
74 74
 
75 75
                     }
76 76
 
77 77
                     // Fires when printing a fee item column.
78
-                    do_action( "getpaid_invoice_fee_item_$column", $fee, $invoice );
78
+                    do_action("getpaid_invoice_fee_item_$column", $fee, $invoice);
79 79
 
80 80
                     // Fires after printing a fee item column.
81
-                    do_action( "getpaid_invoice_fee_item_after_$column", $fee, $invoice );
81
+                    do_action("getpaid_invoice_fee_item_after_$column", $fee, $invoice);
82 82
 
83 83
                 ?>
84 84
 
Please login to merge, or discard this patch.
templates/wpinv-invoice-print.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,20 +7,20 @@  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
 // Fetch the invoice.
13
-if ( empty( $invoice ) ) {
14
-    $invoice = new WPInv_Invoice( $GLOBALS['post'] );
13
+if (empty($invoice)) {
14
+    $invoice = new WPInv_Invoice($GLOBALS['post']);
15 15
 }
16 16
 
17 17
 // Abort if it does not exist.
18
-if ( $invoice->get_id() == 0 ) {
18
+if ($invoice->get_id() == 0) {
19 19
     exit;
20 20
 }
21 21
 
22 22
 // Fires before printing an invoice.
23
-do_action( 'wpinv_invoice_print_before_display', $invoice );
23
+do_action('wpinv_invoice_print_before_display', $invoice);
24 24
 
25 25
 ?><!DOCTYPE html>
26 26
 
@@ -29,24 +29,24 @@  discard block
 block discarded – undo
29 29
 
30 30
     <head>
31 31
 
32
-		<meta charset="<?php bloginfo( 'charset' ); ?>">
32
+		<meta charset="<?php bloginfo('charset'); ?>">
33 33
         <meta name="viewport" content="width=device-width, initial-scale=1.0" >
34 34
 
35 35
         <meta name="robots" content="noindex,nofollow">
36 36
 
37 37
 		<link rel="profile" href="https://gmpg.org/xfn/11">
38 38
 
39
-        <title>#<?php echo esc_html( $invoice->get_number() ); ?></title>
39
+        <title>#<?php echo esc_html($invoice->get_number()); ?></title>
40 40
 
41
-        <?php do_action( 'wpinv_invoice_print_head', $invoice ); ?>
41
+        <?php do_action('wpinv_invoice_print_head', $invoice); ?>
42 42
 
43 43
     </head>
44 44
 
45 45
 
46 46
     <body class="body wpinv wpinv-print" style="font-weight: 400;">
47 47
 
48
-        <?php do_action( 'getpaid_invoice', $invoice ); ?>
49
-        <?php do_action( 'wpinv_invoice_print_body_end', $invoice ); ?>
48
+        <?php do_action('getpaid_invoice', $invoice); ?>
49
+        <?php do_action('wpinv_invoice_print_body_end', $invoice); ?>
50 50
 
51 51
     </body>
52 52
 
Please login to merge, or discard this patch.
templates/payment-forms-admin/previews/ip_address.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,10 +7,10 @@
 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
 <span>{{form_element.text}}</span>
14 14
 <a target='_blank' href="#">
15
-    <?php echo esc_html( wpinv_get_ip() ); ?>&nbsp;&nbsp;<i class='fa fa-external-link-square' aria-hidden='true'></i>
15
+    <?php echo esc_html(wpinv_get_ip()); ?>&nbsp;&nbsp;<i class='fa fa-external-link-square' aria-hidden='true'></i>
16 16
 </a>
Please login to merge, or discard this patch.