Passed
Push — master ( 72070d...9d2707 )
by Brian
12:36 queued 08:13
created
templates/emails/invoice-item.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -10,67 +10,67 @@  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 sanitize_html_class( $item->get_type() ); ?>">
19
+<tr class="wpinv_cart_item item-type-<?php echo sanitize_html_class($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 sanitize_html_class( $column ); ?>">
23
+        <td class="<?php echo 'name' == $column ? 'text-left' : 'text-right' ?> wpinv_cart_item_<?php echo sanitize_html_class($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">' . sanitize_text_field( $item->get_name() ) . '</div>';
34
+                    echo '<div class="wpinv_email_cart_item_title">' . sanitize_text_field($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
-                        $description = wp_kses_post( $description );
39
+                    if (!empty($description)) {
40
+                        $description = wp_kses_post($description);
41 41
                         echo "<p class='small'>$description</p>";
42 42
                     }
43 43
 
44 44
                     // Price help text
45
-                    $description = getpaid_item_recurring_price_help_text( $item, $currency );
46
-                    if ( $description ) {
45
+                    $description = getpaid_item_recurring_price_help_text($item, $currency);
46
+                    if ($description) {
47 47
                         echo "<p class='small'>$description</p>";
48 48
                     }
49 49
 
50 50
                 }
51 51
 
52 52
                 // Item price.
53
-                if ( 'price' == $column ) {
53
+                if ('price' == $column) {
54 54
 
55 55
                     // Display the item price (or recurring price if this is a renewal invoice)
56 56
                     $price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
57
-                    echo wpinv_price( $price );
57
+                    echo wpinv_price($price);
58 58
 
59 59
                 }
60 60
 
61 61
                 // Item quantity.
62
-                if ( 'quantity' == $column ) {
62
+                if ('quantity' == $column) {
63 63
                     echo (int) $item->get_quantity();
64 64
                 }
65 65
 
66 66
                 // Item sub total.
67
-                if ( 'subtotal' == $column ) {
67
+                if ('subtotal' == $column) {
68 68
                     $subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
69
-                    echo wpinv_price( $subtotal );
69
+                    echo wpinv_price($subtotal);
70 70
                 }
71 71
 
72 72
                 // Fires when printing a line item column.
73
-                do_action( "getpaid_email_line_item_$column", $item, $invoice );
73
+                do_action("getpaid_email_line_item_$column", $item, $invoice);
74 74
 
75 75
             ?>
76 76
 
@@ -80,4 +80,4 @@  discard block
 block discarded – undo
80 80
 
81 81
 </tr>
82 82
 
83
-<?php do_action( 'getpaid_after_email_line_item', $invoice, $item ); ?>
83
+<?php do_action('getpaid_after_email_line_item', $invoice, $item); ?>
Please login to merge, or discard this patch.
templates/invoice/line-item.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -10,58 +10,58 @@  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">' . sanitize_text_field( $item->get_name() ) . '</div>';
36
+                        echo '<div class="mb-1">' . sanitize_text_field($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
                         // Price help text.
47
-                        $description = getpaid_item_recurring_price_help_text( $item, $currency );
48
-                        if ( $description ) {
47
+                        $description = getpaid_item_recurring_price_help_text($item, $currency);
48
+                        if ($description) {
49 49
                             echo "<small class='form-text text-muted pr-2 m-0'>$description</small>";
50 50
                         }
51 51
 
52
-                        $actions = apply_filters( 'getpaid-invoice-page-line-item-actions', array(), $item, $invoice );
52
+                        $actions = apply_filters('getpaid-invoice-page-line-item-actions', array(), $item, $invoice);
53 53
 
54
-                        if ( ! empty( $actions ) ) {
54
+                        if (!empty($actions)) {
55 55
 
56
-                            $sanitized  = array();
57
-                            foreach ( $actions as $key => $action ) {
58
-                                $key         = sanitize_html_class( $key );
59
-                                $action      = wp_kses_post( $action );
56
+                            $sanitized = array();
57
+                            foreach ($actions as $key => $action) {
58
+                                $key         = sanitize_html_class($key);
59
+                                $action      = wp_kses_post($action);
60 60
                                 $sanitized[] = "<span class='$key'>$action</span>";
61 61
                             }
62 62
 
63 63
                             echo "<small class='form-text getpaid-line-item-actions'>";
64
-                            echo implode( ' | ', $sanitized );
64
+                            echo implode(' | ', $sanitized);
65 65
                             echo '</small>';
66 66
 
67 67
                         }
@@ -69,30 +69,30 @@  discard block
 block discarded – undo
69 69
                     }
70 70
 
71 71
                     // Item price.
72
-                    if ( 'price' == $column ) {
72
+                    if ('price' == $column) {
73 73
 
74 74
                         // Display the item price (or recurring price if this is a renewal invoice)
75 75
                         $price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
76
-                        echo wpinv_price( $price );
76
+                        echo wpinv_price($price);
77 77
 
78 78
                     }
79 79
 
80 80
                     // Item quantity.
81
-                    if ( 'quantity' == $column ) {
81
+                    if ('quantity' == $column) {
82 82
                         echo (int) $item->get_quantity();
83 83
                     }
84 84
 
85 85
                     // Item sub total.
86
-                    if ( 'subtotal' == $column ) {
86
+                    if ('subtotal' == $column) {
87 87
                         $subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
88
-                        echo wpinv_price( $subtotal );
88
+                        echo wpinv_price($subtotal);
89 89
                     }
90 90
 
91 91
                     // Fires when printing a line item column.
92
-                    do_action( "getpaid_invoice_line_item_$column", $item, $invoice );
92
+                    do_action("getpaid_invoice_line_item_$column", $item, $invoice);
93 93
 
94 94
                     // Fires after printing a line item column.
95
-                    do_action( "getpaid_invoice_line_item_after_$column", $item, $invoice );
95
+                    do_action("getpaid_invoice_line_item_after_$column", $item, $invoice);
96 96
 
97 97
                 ?>
98 98
 
Please login to merge, or discard this patch.