Passed
Push — master ( 97ebee...ecfc04 )
by Brian
04:49
created
widgets/invoice.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -36,14 +36,14 @@  discard block
 block discarded – undo
36 36
                     'advanced' => false,
37 37
                 ),
38 38
                 'id'    => array(
39
-	                'title'       => __( 'Invoice', 'invoicing' ),
40
-	                'desc'        => __( 'Enter the invoice ID', 'invoicing' ),
41
-	                'type'        => 'text',
42
-	                'desc_tip'    => true,
43
-	                'default'     => '',
44
-	                'placeholder' => __( '1', 'invoicing' ),
45
-	                'advanced'    => false,
46
-				),
39
+                    'title'       => __( 'Invoice', 'invoicing' ),
40
+                    'desc'        => __( 'Enter the invoice ID', 'invoicing' ),
41
+                    'type'        => 'text',
42
+                    'desc_tip'    => true,
43
+                    'default'     => '',
44
+                    'placeholder' => __( '1', 'invoicing' ),
45
+                    'advanced'    => false,
46
+                ),
47 47
             ),
48 48
 
49 49
         );
@@ -51,26 +51,26 @@  discard block
 block discarded – undo
51 51
         parent::__construct( $options );
52 52
     }
53 53
 
54
-	/**
55
-	 * The Super block output function.
56
-	 *
57
-	 * @param array $args
58
-	 * @param array $widget_args
59
-	 * @param string $content
60
-	 *
61
-	 * @return mixed|string|bool
62
-	 */
54
+    /**
55
+     * The Super block output function.
56
+     *
57
+     * @param array $args
58
+     * @param array $widget_args
59
+     * @param string $content
60
+     *
61
+     * @return mixed|string|bool
62
+     */
63 63
     public function output( $args = array(), $widget_args = array(), $content = '' ) {
64 64
 
65 65
         // Is the shortcode set up correctly?
66
-		if ( empty( $args['id'] ) ) {
67
-			return aui()->alert(
68
-				array(
69
-					'type'    => 'warning',
70
-					'content' => __( 'Missing invoice ID', 'invoicing' ),
71
-				)
72
-			);
73
-		}
66
+        if ( empty( $args['id'] ) ) {
67
+            return aui()->alert(
68
+                array(
69
+                    'type'    => 'warning',
70
+                    'content' => __( 'Missing invoice ID', 'invoicing' ),
71
+                )
72
+            );
73
+        }
74 74
 
75 75
         $invoice = wpinv_get_invoice( (int) $args['id'] );
76 76
 
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) {
2
+if (!defined('ABSPATH')) {
3 3
     exit;
4 4
 }
5 5
 
@@ -21,34 +21,34 @@  discard block
 block discarded – undo
21 21
             'block-keywords' => "['invoicing','invoice']",
22 22
             'class_name'     => __CLASS__,
23 23
             'base_id'        => 'getpaid_invoice',
24
-            'name'           => __( 'GetPaid > Single Invoice', 'invoicing' ),
24
+            'name'           => __('GetPaid > Single Invoice', 'invoicing'),
25 25
             'widget_ops'     => array(
26 26
                 'classname'   => 'wpinv-invoice-class bsui',
27
-                'description' => esc_html__( 'Displays a single invoice.', 'invoicing' ),
27
+                'description' => esc_html__('Displays a single invoice.', 'invoicing'),
28 28
             ),
29 29
             'arguments'      => array(
30 30
                 'title' => array(
31
-                    'title'    => __( 'Widget title', 'invoicing' ),
32
-                    'desc'     => __( 'Enter widget title.', 'invoicing' ),
31
+                    'title'    => __('Widget title', 'invoicing'),
32
+                    'desc'     => __('Enter widget title.', 'invoicing'),
33 33
                     'type'     => 'text',
34 34
                     'desc_tip' => true,
35 35
                     'default'  => '',
36 36
                     'advanced' => false,
37 37
                 ),
38 38
                 'id'    => array(
39
-	                'title'       => __( 'Invoice', 'invoicing' ),
40
-	                'desc'        => __( 'Enter the invoice ID', 'invoicing' ),
39
+	                'title'       => __('Invoice', 'invoicing'),
40
+	                'desc'        => __('Enter the invoice ID', 'invoicing'),
41 41
 	                'type'        => 'text',
42 42
 	                'desc_tip'    => true,
43 43
 	                'default'     => '',
44
-	                'placeholder' => __( '1', 'invoicing' ),
44
+	                'placeholder' => __('1', 'invoicing'),
45 45
 	                'advanced'    => false,
46 46
 				),
47 47
             ),
48 48
 
49 49
         );
50 50
 
51
-        parent::__construct( $options );
51
+        parent::__construct($options);
52 52
     }
53 53
 
54 54
 	/**
@@ -60,30 +60,30 @@  discard block
 block discarded – undo
60 60
 	 *
61 61
 	 * @return mixed|string|bool
62 62
 	 */
63
-    public function output( $args = array(), $widget_args = array(), $content = '' ) {
63
+    public function output($args = array(), $widget_args = array(), $content = '') {
64 64
 
65 65
         // Is the shortcode set up correctly?
66
-		if ( empty( $args['id'] ) ) {
66
+		if (empty($args['id'])) {
67 67
 			return aui()->alert(
68 68
 				array(
69 69
 					'type'    => 'warning',
70
-					'content' => __( 'Missing invoice ID', 'invoicing' ),
70
+					'content' => __('Missing invoice ID', 'invoicing'),
71 71
 				)
72 72
 			);
73 73
 		}
74 74
 
75
-        $invoice = wpinv_get_invoice( (int) $args['id'] );
75
+        $invoice = wpinv_get_invoice((int) $args['id']);
76 76
 
77
-        if ( $invoice ) {
77
+        if ($invoice) {
78 78
             ob_start();
79
-            getpaid_invoice( $invoice );
79
+            getpaid_invoice($invoice);
80 80
             return ob_get_clean();
81 81
         }
82 82
 
83 83
         return aui()->alert(
84 84
             array(
85 85
                 'type'    => 'danger',
86
-                'content' => __( 'Invoice not found', 'invoicing' ),
86
+                'content' => __('Invoice not found', 'invoicing'),
87 87
             )
88 88
         );
89 89
 
Please login to merge, or discard this patch.
widgets/getpaid.php 2 patches
Indentation   +102 added lines, -102 removed lines patch added patch discarded remove patch
@@ -36,36 +36,36 @@  discard block
 block discarded – undo
36 36
                     'desc_tip' => true,
37 37
                     'default'  => '',
38 38
                     'advanced' => false,
39
-				),
39
+                ),
40 40
 
41 41
                 'form'   => array(
42
-	                'title'       => __( 'Form', 'invoicing' ),
43
-	                'desc'        => __( 'Enter a form id in case you want to display a specific payment form', 'invoicing' ),
44
-	                'type'        => 'text',
45
-	                'desc_tip'    => true,
46
-	                'default'     => '',
47
-	                'placeholder' => __( '1', 'invoicing' ),
48
-	                'advanced'    => false,
49
-				),
50
-
51
-				'item'   => array(
52
-	                'title'       => __( 'Items', 'invoicing' ),
53
-	                'desc'        => __( 'Enter comma separated list of invoicing item id and quantity (item_id|quantity). Ex. 101|2. This will be ignored in case you specify a form above. Enter 0 as the quantity to let users select their own quantities', 'invoicing' ),
54
-	                'type'        => 'text',
55
-	                'desc_tip'    => true,
56
-	                'default'     => '',
57
-	                'placeholder' => __( '1', 'invoicing' ),
58
-	                'advanced'    => false,
59
-				),
42
+                    'title'       => __( 'Form', 'invoicing' ),
43
+                    'desc'        => __( 'Enter a form id in case you want to display a specific payment form', 'invoicing' ),
44
+                    'type'        => 'text',
45
+                    'desc_tip'    => true,
46
+                    'default'     => '',
47
+                    'placeholder' => __( '1', 'invoicing' ),
48
+                    'advanced'    => false,
49
+                ),
50
+
51
+                'item'   => array(
52
+                    'title'       => __( 'Items', 'invoicing' ),
53
+                    'desc'        => __( 'Enter comma separated list of invoicing item id and quantity (item_id|quantity). Ex. 101|2. This will be ignored in case you specify a form above. Enter 0 as the quantity to let users select their own quantities', 'invoicing' ),
54
+                    'type'        => 'text',
55
+                    'desc_tip'    => true,
56
+                    'default'     => '',
57
+                    'placeholder' => __( '1', 'invoicing' ),
58
+                    'advanced'    => false,
59
+                ),
60 60
 
61 61
                 'button' => array(
62
-	                'title'    => __( 'Button', 'invoicing' ),
63
-	                'desc'     => __( 'Enter button label in case you would like to display the forms in a popup.', 'invoicing' ),
64
-	                'type'     => 'text',
65
-	                'desc_tip' => true,
66
-	                'default'  => '',
67
-	                'advanced' => false,
68
-				),
62
+                    'title'    => __( 'Button', 'invoicing' ),
63
+                    'desc'     => __( 'Enter button label in case you would like to display the forms in a popup.', 'invoicing' ),
64
+                    'type'     => 'text',
65
+                    'desc_tip' => true,
66
+                    'default'  => '',
67
+                    'advanced' => false,
68
+                ),
69 69
 
70 70
             ),
71 71
 
@@ -74,96 +74,96 @@  discard block
 block discarded – undo
74 74
         parent::__construct( $options );
75 75
     }
76 76
 
77
-	/**
78
-	 * The Super block output function.
79
-	 *
80
-	 * @param array $args
81
-	 * @param array $widget_args
82
-	 * @param string $content
83
-	 *
84
-	 * @return string
85
-	 */
77
+    /**
78
+     * The Super block output function.
79
+     *
80
+     * @param array $args
81
+     * @param array $widget_args
82
+     * @param string $content
83
+     *
84
+     * @return string
85
+     */
86 86
     public function output( $args = array(), $widget_args = array(), $content = '' ) {
87 87
 
88
-	    // Is the shortcode set up correctly?
89
-		if ( empty( $args['form'] ) && empty( $args['item'] ) ) {
90
-			return aui()->alert(
91
-				array(
92
-					'type'    => 'warning',
93
-					'content' => __( 'No payment form or item selected', 'invoicing' ),
94
-				)
95
-			);
96
-		}
97
-
98
-		// Payment form or button?
99
-		if ( ! empty( $args['form'] ) ) {
100
-			return $this->handle_payment_form( $args );
101
-		} else {
102
-			return $this->handle_buy_item( $args );
103
-		}
104
-
105
-	}
106
-
107
-	/**
108
-	 * Displaying a payment form
109
-	 *
110
-	 * @return string
111
-	 */
88
+        // Is the shortcode set up correctly?
89
+        if ( empty( $args['form'] ) && empty( $args['item'] ) ) {
90
+            return aui()->alert(
91
+                array(
92
+                    'type'    => 'warning',
93
+                    'content' => __( 'No payment form or item selected', 'invoicing' ),
94
+                )
95
+            );
96
+        }
97
+
98
+        // Payment form or button?
99
+        if ( ! empty( $args['form'] ) ) {
100
+            return $this->handle_payment_form( $args );
101
+        } else {
102
+            return $this->handle_buy_item( $args );
103
+        }
104
+
105
+    }
106
+
107
+    /**
108
+     * Displaying a payment form
109
+     *
110
+     * @return string
111
+     */
112 112
     protected function handle_payment_form( $args = array() ) {
113 113
 
114
-		if ( empty( $args['button'] ) ) {
115
-			ob_start();
116
-			getpaid_display_payment_form( $args['form'] );
117
-			return ob_get_clean();
118
-		}
114
+        if ( empty( $args['button'] ) ) {
115
+            ob_start();
116
+            getpaid_display_payment_form( $args['form'] );
117
+            return ob_get_clean();
118
+        }
119 119
 
120
-		return $this->payment_form_button( $args['form'], $args['button'] );
121
-	}
120
+        return $this->payment_form_button( $args['form'], $args['button'] );
121
+    }
122 122
 
123
-	/**
124
-	 * Displays a payment form button.
125
-	 *
126
-	 * @return string
127
-	 */
123
+    /**
124
+     * Displays a payment form button.
125
+     *
126
+     * @return string
127
+     */
128 128
     protected function payment_form_button( $form, $button ) {
129
-		return getpaid_get_payment_button( $button, $form );
130
-	}
131
-
132
-	/**
133
-	 * Selling an item
134
-	 *
135
-	 * @return string
136
-	 */
129
+        return getpaid_get_payment_button( $button, $form );
130
+    }
131
+
132
+    /**
133
+     * Selling an item
134
+     *
135
+     * @return string
136
+     */
137 137
     protected function handle_buy_item( $args = array() ) {
138 138
 
139
-		if ( empty( $args['button'] ) ) {
140
-			return $this->buy_item_form( $args['item'] );
141
-		}
139
+        if ( empty( $args['button'] ) ) {
140
+            return $this->buy_item_form( $args['item'] );
141
+        }
142 142
 
143
-		return $this->buy_item_button( $args['item'], $args['button'] );
143
+        return $this->buy_item_button( $args['item'], $args['button'] );
144 144
 
145
-	}
145
+    }
146 146
 
147
-	/**
148
-	 * Displays a buy item form.
149
-	 *
150
-	 * @return string
151
-	 */
147
+    /**
148
+     * Displays a buy item form.
149
+     *
150
+     * @return string
151
+     */
152 152
     protected function buy_item_form( $item ) {
153
-		$items = getpaid_convert_items_to_array( $item );
154
-		ob_start();
155
-		getpaid_display_item_payment_form( $items );
156
-		return ob_get_clean();
157
-	}
158
-
159
-	/**
160
-	 * Displays a buy item button.
161
-	 *
162
-	 * @return string
163
-	 */
153
+        $items = getpaid_convert_items_to_array( $item );
154
+        ob_start();
155
+        getpaid_display_item_payment_form( $items );
156
+        return ob_get_clean();
157
+    }
158
+
159
+    /**
160
+     * Displays a buy item button.
161
+     *
162
+     * @return string
163
+     */
164 164
     protected function buy_item_button( $item, $button ) {
165
-		$button = getpaid_get_payment_button( $button, null, $item );
166
-		return apply_filters( 'getpaid_buy_item_button_widget', $button, $item );
165
+        $button = getpaid_get_payment_button( $button, null, $item );
166
+        return apply_filters( 'getpaid_buy_item_button_widget', $button, $item );
167 167
     }
168 168
 
169 169
 }
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) {
2
+if (!defined('ABSPATH')) {
3 3
     exit;
4 4
 }
5 5
 
@@ -22,16 +22,16 @@  discard block
 block discarded – undo
22 22
             'block-keywords' => "['invoicing','buy', 'buy item', 'form']",
23 23
             'class_name'     => __CLASS__,
24 24
             'base_id'        => 'getpaid',
25
-            'name'           => __( 'GetPaid', 'invoicing' ),
25
+            'name'           => __('GetPaid', 'invoicing'),
26 26
             'widget_ops'     => array(
27 27
                 'classname'   => 'getpaid bsui',
28
-                'description' => esc_html__( 'Show payment forms or buttons.', 'invoicing' ),
28
+                'description' => esc_html__('Show payment forms or buttons.', 'invoicing'),
29 29
             ),
30 30
             'arguments'      => array(
31 31
 
32 32
                 'title'  => array(
33
-                    'title'    => __( 'Widget title', 'invoicing' ),
34
-                    'desc'     => __( 'Enter widget title.', 'invoicing' ),
33
+                    'title'    => __('Widget title', 'invoicing'),
34
+                    'desc'     => __('Enter widget title.', 'invoicing'),
35 35
                     'type'     => 'text',
36 36
                     'desc_tip' => true,
37 37
                     'default'  => '',
@@ -39,28 +39,28 @@  discard block
 block discarded – undo
39 39
 				),
40 40
 
41 41
                 'form'   => array(
42
-	                'title'       => __( 'Form', 'invoicing' ),
43
-	                'desc'        => __( 'Enter a form id in case you want to display a specific payment form', 'invoicing' ),
42
+	                'title'       => __('Form', 'invoicing'),
43
+	                'desc'        => __('Enter a form id in case you want to display a specific payment form', 'invoicing'),
44 44
 	                'type'        => 'text',
45 45
 	                'desc_tip'    => true,
46 46
 	                'default'     => '',
47
-	                'placeholder' => __( '1', 'invoicing' ),
47
+	                'placeholder' => __('1', 'invoicing'),
48 48
 	                'advanced'    => false,
49 49
 				),
50 50
 
51 51
 				'item'   => array(
52
-	                'title'       => __( 'Items', 'invoicing' ),
53
-	                'desc'        => __( 'Enter comma separated list of invoicing item id and quantity (item_id|quantity). Ex. 101|2. This will be ignored in case you specify a form above. Enter 0 as the quantity to let users select their own quantities', 'invoicing' ),
52
+	                'title'       => __('Items', 'invoicing'),
53
+	                'desc'        => __('Enter comma separated list of invoicing item id and quantity (item_id|quantity). Ex. 101|2. This will be ignored in case you specify a form above. Enter 0 as the quantity to let users select their own quantities', 'invoicing'),
54 54
 	                'type'        => 'text',
55 55
 	                'desc_tip'    => true,
56 56
 	                'default'     => '',
57
-	                'placeholder' => __( '1', 'invoicing' ),
57
+	                'placeholder' => __('1', 'invoicing'),
58 58
 	                'advanced'    => false,
59 59
 				),
60 60
 
61 61
                 'button' => array(
62
-	                'title'    => __( 'Button', 'invoicing' ),
63
-	                'desc'     => __( 'Enter button label in case you would like to display the forms in a popup.', 'invoicing' ),
62
+	                'title'    => __('Button', 'invoicing'),
63
+	                'desc'     => __('Enter button label in case you would like to display the forms in a popup.', 'invoicing'),
64 64
 	                'type'     => 'text',
65 65
 	                'desc_tip' => true,
66 66
 	                'default'  => '',
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
         );
73 73
 
74
-        parent::__construct( $options );
74
+        parent::__construct($options);
75 75
     }
76 76
 
77 77
 	/**
@@ -83,23 +83,23 @@  discard block
 block discarded – undo
83 83
 	 *
84 84
 	 * @return string
85 85
 	 */
86
-    public function output( $args = array(), $widget_args = array(), $content = '' ) {
86
+    public function output($args = array(), $widget_args = array(), $content = '') {
87 87
 
88 88
 	    // Is the shortcode set up correctly?
89
-		if ( empty( $args['form'] ) && empty( $args['item'] ) ) {
89
+		if (empty($args['form']) && empty($args['item'])) {
90 90
 			return aui()->alert(
91 91
 				array(
92 92
 					'type'    => 'warning',
93
-					'content' => __( 'No payment form or item selected', 'invoicing' ),
93
+					'content' => __('No payment form or item selected', 'invoicing'),
94 94
 				)
95 95
 			);
96 96
 		}
97 97
 
98 98
 		// Payment form or button?
99
-		if ( ! empty( $args['form'] ) ) {
100
-			return $this->handle_payment_form( $args );
99
+		if (!empty($args['form'])) {
100
+			return $this->handle_payment_form($args);
101 101
 		} else {
102
-			return $this->handle_buy_item( $args );
102
+			return $this->handle_buy_item($args);
103 103
 		}
104 104
 
105 105
 	}
@@ -109,15 +109,15 @@  discard block
 block discarded – undo
109 109
 	 *
110 110
 	 * @return string
111 111
 	 */
112
-    protected function handle_payment_form( $args = array() ) {
112
+    protected function handle_payment_form($args = array()) {
113 113
 
114
-		if ( empty( $args['button'] ) ) {
114
+		if (empty($args['button'])) {
115 115
 			ob_start();
116
-			getpaid_display_payment_form( $args['form'] );
116
+			getpaid_display_payment_form($args['form']);
117 117
 			return ob_get_clean();
118 118
 		}
119 119
 
120
-		return $this->payment_form_button( $args['form'], $args['button'] );
120
+		return $this->payment_form_button($args['form'], $args['button']);
121 121
 	}
122 122
 
123 123
 	/**
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
 	 *
126 126
 	 * @return string
127 127
 	 */
128
-    protected function payment_form_button( $form, $button ) {
129
-		return getpaid_get_payment_button( $button, $form );
128
+    protected function payment_form_button($form, $button) {
129
+		return getpaid_get_payment_button($button, $form);
130 130
 	}
131 131
 
132 132
 	/**
@@ -134,13 +134,13 @@  discard block
 block discarded – undo
134 134
 	 *
135 135
 	 * @return string
136 136
 	 */
137
-    protected function handle_buy_item( $args = array() ) {
137
+    protected function handle_buy_item($args = array()) {
138 138
 
139
-		if ( empty( $args['button'] ) ) {
140
-			return $this->buy_item_form( $args['item'] );
139
+		if (empty($args['button'])) {
140
+			return $this->buy_item_form($args['item']);
141 141
 		}
142 142
 
143
-		return $this->buy_item_button( $args['item'], $args['button'] );
143
+		return $this->buy_item_button($args['item'], $args['button']);
144 144
 
145 145
 	}
146 146
 
@@ -149,10 +149,10 @@  discard block
 block discarded – undo
149 149
 	 *
150 150
 	 * @return string
151 151
 	 */
152
-    protected function buy_item_form( $item ) {
153
-		$items = getpaid_convert_items_to_array( $item );
152
+    protected function buy_item_form($item) {
153
+		$items = getpaid_convert_items_to_array($item);
154 154
 		ob_start();
155
-		getpaid_display_item_payment_form( $items );
155
+		getpaid_display_item_payment_form($items);
156 156
 		return ob_get_clean();
157 157
 	}
158 158
 
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
 	 *
162 162
 	 * @return string
163 163
 	 */
164
-    protected function buy_item_button( $item, $button ) {
165
-		$button = getpaid_get_payment_button( $button, null, $item );
166
-		return apply_filters( 'getpaid_buy_item_button_widget', $button, $item );
164
+    protected function buy_item_button($item, $button) {
165
+		$button = getpaid_get_payment_button($button, null, $item);
166
+		return apply_filters('getpaid_buy_item_button_widget', $button, $item);
167 167
     }
168 168
 
169 169
 }
Please login to merge, or discard this patch.
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 _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
-                        <?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( __( '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/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
-                    __( 'Print %s', 'invoicing' ),
25
-                    esc_html( ucfirst( $invoice->get_invoice_quote_type() ) )
24
+                    __('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-meta.php 1 patch
Spacing   +17 added lines, -17 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
-                                <th class="<?php echo esc_attr( $class ); ?> font-weight-bold" style="width: 40%">
32
-                                    <?php echo esc_html( $data['label'] ); ?>
31
+                                <th class="<?php echo esc_attr($class); ?> font-weight-bold" style="width: 40%">
32
+                                    <?php echo esc_html($data['label']); ?>
33 33
                                 </th>
34 34
 
35
-                                <td class="<?php echo esc_attr( $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>
35
+                                <td class="<?php echo esc_attr($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>
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-item.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -32,34 +32,34 @@  discard block
 block discarded – undo
32 32
                     // Item name.
33 33
                     if ( 'name' == $column ) {
34 34
 
35
-					// Display the name.
36
-					echo '<div class="mb-1">' . esc_html( $item->get_name() ) . '</div>';
35
+                    // Display the name.
36
+                    echo '<div class="mb-1">' . esc_html( $item->get_name() ) . '</div>';
37 37
 
38
-					// And an optional description.
39
-					$description = $item->get_description();
38
+                    // And an optional description.
39
+                    $description = $item->get_description();
40 40
 
41
-					if ( ! empty( $description ) ) {
42
-						$description = wp_kses_post( $description );
43
-						echo "<small class='form-text text-muted pr-2 m-0'>$description</small>";
41
+                    if ( ! empty( $description ) ) {
42
+                        $description = wp_kses_post( $description );
43
+                        echo "<small class='form-text text-muted pr-2 m-0'>$description</small>";
44 44
                         }
45 45
 
46
-					// Fires before printing the line item actions.
47
-					do_action( 'getpaid_before_invoice_line_item_actions', $item, $invoice );
46
+                    // Fires before printing the line item actions.
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 );
57
-							$sanitized[] = "<span class='$key'>$action</span>";
53
+                        $sanitized  = array();
54
+                        foreach ( $actions as $key => $action ) {
55
+                            $key         = sanitize_html_class( $key );
56
+                            $action      = wp_kses_post( $action );
57
+                            $sanitized[] = "<span class='$key'>$action</span>";
58 58
                             }
59 59
 
60
-						echo "<small class='form-text getpaid-line-item-actions'>";
61
-						echo implode( ' | ', $sanitized );
62
-						echo '</small>';
60
+                        echo "<small class='form-text getpaid-line-item-actions'>";
61
+                        echo implode( ' | ', $sanitized );
62
+                        echo '</small>';
63 63
 
64 64
                         }
65 65
 }
@@ -67,26 +67,26 @@  discard block
 block discarded – undo
67 67
                     // Item price.
68 68
                     if ( 'price' == $column ) {
69 69
 
70
-					// Display the item price (or recurring price if this is a renewal invoice)
71
-					$price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
72
-					echo wpinv_price( $price, $invoice->get_currency() );
70
+                    // Display the item price (or recurring price if this is a renewal invoice)
71
+                    $price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
72
+                    echo wpinv_price( $price, $invoice->get_currency() );
73 73
 
74 74
                     }
75 75
 
76 76
                     // Tax rate.
77 77
                     if ( 'tax_rate' == $column ) {
78
-					echo round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) . '%';
78
+                    echo round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) . '%';
79 79
                     }
80 80
 
81 81
                     // Item quantity.
82 82
                     if ( 'quantity' == $column ) {
83
-					echo (float) $item->get_quantity();
83
+                    echo (float) $item->get_quantity();
84 84
                     }
85 85
 
86 86
                     // Item sub total.
87 87
                     if ( 'subtotal' == $column ) {
88
-					$subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
89
-					echo wpinv_price( $subtotal, $invoice->get_currency() );
88
+                    $subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
89
+                    echo wpinv_price( $subtotal, $invoice->get_currency() );
90 90
                     }
91 91
 
92 92
                     // Fires when printing a line item column.
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -10,90 +10,90 @@
 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
                         }
65 65
 }
66 66
 
67 67
                     // Item price.
68
-                    if ( 'price' == $column ) {
68
+                    if ('price' == $column) {
69 69
 
70 70
 					// Display the item price (or recurring price if this is a renewal invoice)
71 71
 					$price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
72
-					echo wpinv_price( $price, $invoice->get_currency() );
72
+					echo wpinv_price($price, $invoice->get_currency());
73 73
 
74 74
                     }
75 75
 
76 76
                     // Tax rate.
77
-                    if ( 'tax_rate' == $column ) {
78
-					echo round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) . '%';
77
+                    if ('tax_rate' == $column) {
78
+					echo round(getpaid_get_invoice_tax_rate($invoice, $item), 2) . '%';
79 79
                     }
80 80
 
81 81
                     // Item quantity.
82
-                    if ( 'quantity' == $column ) {
82
+                    if ('quantity' == $column) {
83 83
 					echo (float) $item->get_quantity();
84 84
                     }
85 85
 
86 86
                     // Item sub total.
87
-                    if ( 'subtotal' == $column ) {
87
+                    if ('subtotal' == $column) {
88 88
 					$subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
89
-					echo wpinv_price( $subtotal, $invoice->get_currency() );
89
+					echo wpinv_price($subtotal, $invoice->get_currency());
90 90
                     }
91 91
 
92 92
                     // Fires when printing a line item column.
93
-                    do_action( "getpaid_invoice_line_item_$column", $item, $invoice );
93
+                    do_action("getpaid_invoice_line_item_$column", $item, $invoice);
94 94
 
95 95
                     // Fires after printing a line item column.
96
-                    do_action( "getpaid_invoice_line_item_after_$column", $item, $invoice );
96
+                    do_action("getpaid_invoice_line_item_after_$column", $item, $invoice);
97 97
 
98 98
                 ?>
99 99
 
Please login to merge, or discard this patch.
templates/invoice/line-totals.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -37,42 +37,42 @@
 block discarded – undo
37 37
 
38 38
                                 // Total tax.
39 39
                                 if ( 'tax' == $key ) {
40
-								echo wpinv_price( $invoice->get_total_tax(), $invoice->get_currency() );
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
-									$taxes = $invoice->get_total_tax();
45
-									if ( empty( $taxes ) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction( $invoice->get_country() ) ) {
46
-										echo ' <em class="text-muted small">';
47
-										_x( '(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing' );
48
-										echo '</em>';
44
+                                    $taxes = $invoice->get_total_tax();
45
+                                    if ( empty( $taxes ) && GetPaid_Payment_Form_Submission_Taxes::is_eu_transaction( $invoice->get_country() ) ) {
46
+                                        echo ' <em class="text-muted small">';
47
+                                        _x( '(Reverse charged)', 'This is a legal term for reverse charging tax in the EU', 'invoicing' );
48
+                                        echo '</em>';
49 49
                                         }
50 50
 }
51 51
 }
52 52
 
53 53
                                 // Total Fee.
54 54
                                 if ( 'fee' == $key ) {
55
-								echo wpinv_price( $invoice->get_total_fees(), $invoice->get_currency() );
55
+                                echo wpinv_price( $invoice->get_total_fees(), $invoice->get_currency() );
56 56
                                 }
57 57
 
58 58
                                 // Total discount.
59 59
                                 if ( 'discount' == $key ) {
60
-								echo wpinv_price( $invoice->get_total_discount(), $invoice->get_currency() );
60
+                                echo wpinv_price( $invoice->get_total_discount(), $invoice->get_currency() );
61 61
                                 }
62 62
 
63 63
                                 // Shipping.
64 64
                                 if ( 'shipping' == $key ) {
65
-								echo wpinv_price( $invoice->get_shipping(), $invoice->get_currency() );
65
+                                echo wpinv_price( $invoice->get_shipping(), $invoice->get_currency() );
66 66
                                 }
67 67
 
68 68
                                 // Sub total.
69 69
                                 if ( 'subtotal' == $key ) {
70
-								echo wpinv_price( $invoice->get_subtotal(), $invoice->get_currency() );
70
+                                echo wpinv_price( $invoice->get_subtotal(), $invoice->get_currency() );
71 71
                                 }
72 72
 
73 73
                                 // Total.
74 74
                                 if ( 'total' == $key ) {
75
-								echo wpinv_price( $invoice->get_total(), $invoice->get_currency() );
75
+                                echo wpinv_price( $invoice->get_total(), $invoice->get_currency() );
76 76
                                 }
77 77
 
78 78
                                 // Fires when printing a cart total.
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 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,47 +36,47 @@  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
 }
51 51
 }
52 52
 
53 53
                                 // Total Fee.
54
-                                if ( 'fee' == $key ) {
55
-								echo wpinv_price( $invoice->get_total_fees(), $invoice->get_currency() );
54
+                                if ('fee' == $key) {
55
+								echo wpinv_price($invoice->get_total_fees(), $invoice->get_currency());
56 56
                                 }
57 57
 
58 58
                                 // Total discount.
59
-                                if ( 'discount' == $key ) {
60
-								echo wpinv_price( $invoice->get_total_discount(), $invoice->get_currency() );
59
+                                if ('discount' == $key) {
60
+								echo wpinv_price($invoice->get_total_discount(), $invoice->get_currency());
61 61
                                 }
62 62
 
63 63
                                 // Shipping.
64
-                                if ( 'shipping' == $key ) {
65
-								echo wpinv_price( $invoice->get_shipping(), $invoice->get_currency() );
64
+                                if ('shipping' == $key) {
65
+								echo wpinv_price($invoice->get_shipping(), $invoice->get_currency());
66 66
                                 }
67 67
 
68 68
                                 // Sub total.
69
-                                if ( 'subtotal' == $key ) {
70
-								echo wpinv_price( $invoice->get_subtotal(), $invoice->get_currency() );
69
+                                if ('subtotal' == $key) {
70
+								echo wpinv_price($invoice->get_subtotal(), $invoice->get_currency());
71 71
                                 }
72 72
 
73 73
                                 // Total.
74
-                                if ( 'total' == $key ) {
75
-								echo wpinv_price( $invoice->get_total(), $invoice->get_currency() );
74
+                                if ('total' == $key) {
75
+								echo wpinv_price($invoice->get_total(), $invoice->get_currency());
76 76
                                 }
77 77
 
78 78
                                 // Fires when printing a cart total.
79
-                                do_action( "getpaid_invoice_cart_totals_$key", $invoice );
79
+                                do_action("getpaid_invoice_cart_totals_$key", $invoice);
80 80
 
81 81
                             ?>
82 82
 
@@ -90,4 +90,4 @@  discard block
 block discarded – undo
90 90
     </div>
91 91
 </div> <!-- end .getpaid-invoice-line-totals -->
92 92
 
93
-<?php do_action( 'getpaid_after_invoice_line_totals', $invoice, $totals ); ?>
93
+<?php do_action('getpaid_after_invoice_line_totals', $invoice, $totals); ?>
Please login to merge, or discard this patch.
templates/invoice/fee-item.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -31,44 +31,44 @@
 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 "<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 "<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
-						echo wpinv_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
+                        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
                     // 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
-						echo wpinv_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
+                        echo wpinv_price( $fee['recurring_fee'], $invoice->get_currency() );
70 70
                         } else {
71
-						echo wpinv_price( $fee['initial_fee'], $invoice->get_currency() );
71
+                        echo wpinv_price( $fee['initial_fee'], $invoice->get_currency() );
72 72
                         }
73 73
 }
74 74
 
Please login to merge, or discard this 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,64 +19,64 @@  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
                     // 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
-						echo wpinv_price( $fee['recurring_fee'], $invoice->get_currency() );
68
+					if ($invoice->is_recurring() && $invoice->is_renewal()) {
69
+						echo wpinv_price($fee['recurring_fee'], $invoice->get_currency());
70 70
                         } else {
71
-						echo wpinv_price( $fee['initial_fee'], $invoice->get_currency() );
71
+						echo wpinv_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/invoice/header.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  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
 ?>
13 13
 
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
             <div class="row">
17 17
 
18 18
                 <div class="col-12 col-sm-6 text-sm-left pl-sm-0">
19
-                    <?php do_action( 'getpaid_invoice_header_left', $invoice ); ?>
19
+                    <?php do_action('getpaid_invoice_header_left', $invoice); ?>
20 20
                 </div>
21 21
 
22 22
                 <div class="col-12 col-sm-6 text-sm-right pr-sm-0">
23
-                    <?php do_action( 'getpaid_invoice_header_right', $invoice ); ?>
23
+                    <?php do_action('getpaid_invoice_header_right', $invoice); ?>
24 24
                 </div>
25 25
 
26 26
             </div>
Please login to merge, or discard this patch.