Passed
Push — master ( 32890d...b6d11a )
by Brian
13:10
created
vendor/composer/installers/src/Composer/Installers/Installer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     {
166 166
         $installPath = $this->getPackageBasePath($package);
167 167
         $io = $this->io;
168
-        $outputStatus = function () use ($io, $installPath) {
168
+        $outputStatus = function() use ($io, $installPath) {
169 169
             $io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
170 170
         };
171 171
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
             $pattern = $locations ? '(' . implode('|', $locations) . ')' : false;
236 236
         }
237 237
 
238
-        return $pattern ? : '(\w+)';
238
+        return $pattern ?: '(\w+)';
239 239
     }
240 240
 
241 241
     /**
Please login to merge, or discard this patch.
vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     public function getLocations()
37 37
     {
38 38
         if ($this->matchesCakeVersion('>=', '3.0.0')) {
39
-            $this->locations['plugin'] =  $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
39
+            $this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
40 40
         }
41 41
         return $this->locations;
42 42
     }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     protected function matchesCakeVersion($matcher, $version)
52 52
     {
53 53
         $repositoryManager = $this->composer->getRepositoryManager();
54
-        if (! $repositoryManager) {
54
+        if (!$repositoryManager) {
55 55
             return false;
56 56
         }
57 57
 
Please login to merge, or discard this patch.
includes/gateways/class-getpaid-bank-transfer-gateway.php 1 patch
Spacing   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
  *
5 5
  */
6 6
 
7
-defined( 'ABSPATH' ) || exit;
7
+defined('ABSPATH') || exit;
8 8
 
9 9
 /**
10 10
  * Bank transfer Payment Gateway class.
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	 *
25 25
 	 * @var array
26 26
 	 */
27
-	protected $supports = array( 'addons' );
27
+	protected $supports = array('addons');
28 28
 
29 29
     /**
30 30
 	 * Payment method order.
@@ -39,15 +39,15 @@  discard block
 block discarded – undo
39 39
 	public function __construct() {
40 40
         parent::__construct();
41 41
 
42
-        $this->title                = __( 'Direct bank transfer', 'invoicing' );
43
-        $this->method_title         = __( 'Bank transfer', 'invoicing' );
44
-        $this->checkout_button_text = __( 'Proceed', 'invoicing' );
45
-        $this->instructions         = apply_filters( 'wpinv_bank_instructions', $this->get_option( 'info' ) );
42
+        $this->title                = __('Direct bank transfer', 'invoicing');
43
+        $this->method_title         = __('Bank transfer', 'invoicing');
44
+        $this->checkout_button_text = __('Proceed', 'invoicing');
45
+        $this->instructions         = apply_filters('wpinv_bank_instructions', $this->get_option('info'));
46 46
 
47
-		add_action( 'wpinv_receipt_end', array( $this, 'thankyou_page' ) );
48
-		add_action( 'getpaid_invoice_line_items', array( $this, 'thankyou_page' ), 40 );
49
-		add_action( 'wpinv_pdf_content_billing', array( $this, 'thankyou_page' ), 11 );
50
-		add_action( 'wpinv_email_invoice_details', array( $this, 'email_instructions' ), 10, 3 );
47
+		add_action('wpinv_receipt_end', array($this, 'thankyou_page'));
48
+		add_action('getpaid_invoice_line_items', array($this, 'thankyou_page'), 40);
49
+		add_action('wpinv_pdf_content_billing', array($this, 'thankyou_page'), 11);
50
+		add_action('wpinv_email_invoice_details', array($this, 'email_instructions'), 10, 3);
51 51
 
52 52
     }
53 53
 
@@ -60,23 +60,23 @@  discard block
 block discarded – undo
60 60
 	 * @param GetPaid_Payment_Form_Submission $submission Checkout submission.
61 61
 	 * @return array
62 62
 	 */
63
-	public function process_payment( $invoice, $submission_data, $submission ) {
63
+	public function process_payment($invoice, $submission_data, $submission) {
64 64
 
65 65
         // Add a transaction id.
66
-        $invoice->set_transaction_id( $invoice->generate_key('trans_') );
66
+        $invoice->set_transaction_id($invoice->generate_key('trans_'));
67 67
 
68 68
         // Set it as pending payment.
69
-        if ( ! $invoice->needs_payment() ) {
69
+        if (!$invoice->needs_payment()) {
70 70
             $invoice->mark_paid();
71
-        } else if ( ! $invoice->is_paid() ) {
72
-            $invoice->set_status( 'wpi-onhold' );
71
+        } else if (!$invoice->is_paid()) {
72
+            $invoice->set_status('wpi-onhold');
73 73
         }
74 74
 
75 75
         // Save it.
76 76
         $invoice->save();
77 77
 
78 78
         // Send to the success page.
79
-        wpinv_send_to_success_page( array( 'invoice_key' => $invoice->get_key() ) );
79
+        wpinv_send_to_success_page(array('invoice_key' => $invoice->get_key()));
80 80
 
81 81
     }
82 82
 
@@ -85,17 +85,17 @@  discard block
 block discarded – undo
85 85
 	 *
86 86
 	 * @param WPInv_Invoice $invoice Invoice.
87 87
 	 */
88
-	public function thankyou_page( $invoice ) {
88
+	public function thankyou_page($invoice) {
89 89
 
90
-        if ( 'bank_transfer' === $invoice->get_gateway() && $invoice->needs_payment() ) {
90
+        if ('bank_transfer' === $invoice->get_gateway() && $invoice->needs_payment()) {
91 91
 
92 92
 			echo '<div class="mt-4 mb-2 getpaid-bank-transfer-details">' . PHP_EOL;
93 93
 
94
-            if ( ! empty( $this->instructions ) ) {
95
-                echo wp_kses_post( wpautop( wptexturize( $this->instructions ) ) );
94
+            if (!empty($this->instructions)) {
95
+                echo wp_kses_post(wpautop(wptexturize($this->instructions)));
96 96
 			}
97 97
 
98
-			$this->bank_details( $invoice );
98
+			$this->bank_details($invoice);
99 99
 
100 100
 			echo '</div>';
101 101
 
@@ -110,17 +110,17 @@  discard block
 block discarded – undo
110 110
 	 * @param string     $email_type Email format: plain text or HTML.
111 111
 	 * @param bool     $sent_to_admin Sent to admin.
112 112
 	 */
113
-	public function email_instructions( $invoice, $email_type, $sent_to_admin ) {
113
+	public function email_instructions($invoice, $email_type, $sent_to_admin) {
114 114
 
115
-		if ( ! $sent_to_admin && 'bank_transfer' === $invoice->get_gateway() && $invoice->needs_payment() ) {
115
+		if (!$sent_to_admin && 'bank_transfer' === $invoice->get_gateway() && $invoice->needs_payment()) {
116 116
 
117 117
 			echo '<div class="wpi-email-row getpaid-bank-transfer-details">';
118 118
 
119
-			if ( $this->instructions ) {
120
-				echo wp_kses_post( wpautop( wptexturize( $this->instructions ) ) . PHP_EOL );
119
+			if ($this->instructions) {
120
+				echo wp_kses_post(wpautop(wptexturize($this->instructions)) . PHP_EOL);
121 121
             }
122 122
 
123
-			$this->bank_details( $invoice );
123
+			$this->bank_details($invoice);
124 124
 			
125 125
 			echo '</div>';
126 126
 
@@ -133,51 +133,51 @@  discard block
 block discarded – undo
133 133
 	 *
134 134
 	 * @param WPInv_Invoice $invoice Invoice.
135 135
 	 */
136
-	protected function bank_details( $invoice ) {
136
+	protected function bank_details($invoice) {
137 137
 
138 138
 		// Get the invoice country and country $locale.
139 139
 		$country = $invoice->get_country();
140 140
 		$locale  = $this->get_country_locale();
141 141
 
142 142
 		// Get sortcode label in the $locale array and use appropriate one.
143
-		$sortcode = isset( $locale[ $country ]['sortcode']['label'] ) ? $locale[ $country ]['sortcode']['label'] : __( 'Sort code', 'invoicing' );
143
+		$sortcode = isset($locale[$country]['sortcode']['label']) ? $locale[$country]['sortcode']['label'] : __('Sort code', 'invoicing');
144 144
 
145 145
         $bank_fields = array(
146
-            'ac_name'     => __( 'Account Name', 'invoicing' ),
147
-            'ac_no'       => __( 'Account Number', 'invoicing' ),
148
-            'bank_name'   => __( 'Bank Name', 'invoicing' ),
149
-            'ifsc'        => __( 'IFSC code', 'invoicing' ),
150
-            'iban'        => __( 'IBAN', 'invoicing' ),
151
-            'bic'         => __( 'BIC/Swift code', 'invoicing' ),
146
+            'ac_name'     => __('Account Name', 'invoicing'),
147
+            'ac_no'       => __('Account Number', 'invoicing'),
148
+            'bank_name'   => __('Bank Name', 'invoicing'),
149
+            'ifsc'        => __('IFSC code', 'invoicing'),
150
+            'iban'        => __('IBAN', 'invoicing'),
151
+            'bic'         => __('BIC/Swift code', 'invoicing'),
152 152
             'sort_code'   => $sortcode,
153 153
         );
154 154
 
155 155
         $bank_info = array();
156 156
 
157
-        foreach ( $bank_fields as $field => $label ) {
158
-            $value = $this->get_option( $field );
157
+        foreach ($bank_fields as $field => $label) {
158
+            $value = $this->get_option($field);
159 159
 
160
-            if ( ! empty( $value ) ) {
161
-                $bank_info[$field] = array( 'label' => $label, 'value' => $value );
160
+            if (!empty($value)) {
161
+                $bank_info[$field] = array('label' => $label, 'value' => $value);
162 162
             }
163 163
 
164 164
         }
165 165
 
166
-        $bank_info = apply_filters( 'wpinv_bank_info', $bank_info );
166
+        $bank_info = apply_filters('wpinv_bank_info', $bank_info);
167 167
 
168
-        if ( empty( $bank_info ) ) {
168
+        if (empty($bank_info)) {
169 169
             return;
170 170
         }
171 171
 
172
-		echo '<h3 class="getpaid-bank-transfer-title"> ' . apply_filters( 'wpinv_receipt_bank_details_title', __( 'Bank Details', 'invoicing' ) ) . '</h3>' . PHP_EOL;
172
+		echo '<h3 class="getpaid-bank-transfer-title"> ' . apply_filters('wpinv_receipt_bank_details_title', __('Bank Details', 'invoicing')) . '</h3>' . PHP_EOL;
173 173
 
174 174
 		echo '<table class="table table-bordered getpaid-bank-transfer-details">' . PHP_EOL;
175 175
 
176
-		foreach ( $bank_info as $key => $data ) {
176
+		foreach ($bank_info as $key => $data) {
177 177
 
178
-			$key   = sanitize_html_class( $key );
179
-			$label = wp_kses_post( $data['label'] );
180
-			$value = wp_kses_post( wptexturize( $data['value'] ) );
178
+			$key   = sanitize_html_class($key);
179
+			$label = wp_kses_post($data['label']);
180
+			$value = wp_kses_post(wptexturize($data['value']));
181 181
 
182 182
 			echo "<tr class='getpaid-bank-transfer-$key'><th class='font-weight-bold'>$label</th><td class='w-75'>$value</td></tr>" . PHP_EOL;
183 183
 		}
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 	 */
194 194
 	public function get_country_locale() {
195 195
 
196
-		if ( empty( $this->locale ) ) {
196
+		if (empty($this->locale)) {
197 197
 
198 198
 			// Locale information to be used - only those that are not 'Sort Code'.
199 199
 			$this->locale = apply_filters(
@@ -201,42 +201,42 @@  discard block
 block discarded – undo
201 201
 				array(
202 202
 					'AU' => array(
203 203
 						'sortcode' => array(
204
-							'label' => __( 'BSB', 'invoicing' ),
204
+							'label' => __('BSB', 'invoicing'),
205 205
 						),
206 206
 					),
207 207
 					'CA' => array(
208 208
 						'sortcode' => array(
209
-							'label' => __( 'Bank transit number', 'invoicing' ),
209
+							'label' => __('Bank transit number', 'invoicing'),
210 210
 						),
211 211
 					),
212 212
 					'IN' => array(
213 213
 						'sortcode' => array(
214
-							'label' => __( 'IFSC', 'invoicing' ),
214
+							'label' => __('IFSC', 'invoicing'),
215 215
 						),
216 216
 					),
217 217
 					'IT' => array(
218 218
 						'sortcode' => array(
219
-							'label' => __( 'Branch sort', 'invoicing' ),
219
+							'label' => __('Branch sort', 'invoicing'),
220 220
 						),
221 221
 					),
222 222
 					'NZ' => array(
223 223
 						'sortcode' => array(
224
-							'label' => __( 'Bank code', 'invoicing' ),
224
+							'label' => __('Bank code', 'invoicing'),
225 225
 						),
226 226
 					),
227 227
 					'SE' => array(
228 228
 						'sortcode' => array(
229
-							'label' => __( 'Bank code', 'invoicing' ),
229
+							'label' => __('Bank code', 'invoicing'),
230 230
 						),
231 231
 					),
232 232
 					'US' => array(
233 233
 						'sortcode' => array(
234
-							'label' => __( 'Routing number', 'invoicing' ),
234
+							'label' => __('Routing number', 'invoicing'),
235 235
 						),
236 236
 					),
237 237
 					'ZA' => array(
238 238
 						'sortcode' => array(
239
-							'label' => __( 'Branch code', 'invoicing' ),
239
+							'label' => __('Branch code', 'invoicing'),
240 240
 						),
241 241
 					),
242 242
 				)
@@ -253,51 +253,51 @@  discard block
 block discarded – undo
253 253
 	 * 
254 254
 	 * @param array $admin_settings
255 255
 	 */
256
-	public function admin_settings( $admin_settings ) {
256
+	public function admin_settings($admin_settings) {
257 257
 
258
-        $admin_settings['bank_transfer_desc']['std']    = __( "Make your payment directly into our bank account. Please use your Invoice Number as the payment reference. Your invoice won't be processed until the funds have cleared in our account.", 'invoicing' );
259
-		$admin_settings['bank_transfer_active']['desc'] = __( 'Enable bank transfer', 'invoicing' );
258
+        $admin_settings['bank_transfer_desc']['std'] = __("Make your payment directly into our bank account. Please use your Invoice Number as the payment reference. Your invoice won't be processed until the funds have cleared in our account.", 'invoicing');
259
+		$admin_settings['bank_transfer_active']['desc'] = __('Enable bank transfer', 'invoicing');
260 260
 
261
-		$locale  = $this->get_country_locale();
261
+		$locale = $this->get_country_locale();
262 262
 
263 263
 		// Get sortcode label in the $locale array and use appropriate one.
264 264
 		$country  = wpinv_default_billing_country();
265
-		$sortcode = isset( $locale[ $country ]['sortcode']['label'] ) ? $locale[ $country ]['sortcode']['label'] : __( 'Sort code', 'invoicing' );
265
+		$sortcode = isset($locale[$country]['sortcode']['label']) ? $locale[$country]['sortcode']['label'] : __('Sort code', 'invoicing');
266 266
 
267 267
 		$admin_settings['bank_transfer_ac_name'] = array(
268 268
             'type' => 'text',
269 269
             'id'   => 'bank_transfer_ac_name',
270
-            'name' => __( 'Account Name', 'invoicing' ),
270
+            'name' => __('Account Name', 'invoicing'),
271 271
 		);
272 272
 		
273 273
 		$admin_settings['bank_transfer_ac_no'] = array(
274 274
             'type' => 'text',
275 275
             'id'   => 'bank_transfer_ac_no',
276
-            'name' => __( 'Account Number', 'invoicing' ),
276
+            'name' => __('Account Number', 'invoicing'),
277 277
 		);
278 278
 		
279 279
 		$admin_settings['bank_transfer_bank_name'] = array(
280 280
             'type' => 'text',
281 281
             'id'   => 'bank_transfer_bank_name',
282
-            'name' => __( 'Bank Name', 'invoicing' ),
282
+            'name' => __('Bank Name', 'invoicing'),
283 283
 		);
284 284
 
285 285
 		$admin_settings['bank_transfer_ifsc'] = array(
286 286
             'type' => 'text',
287 287
             'id'   => 'bank_transfer_ifsc',
288
-            'name' => __( 'IFSC Code', 'invoicing' ),
288
+            'name' => __('IFSC Code', 'invoicing'),
289 289
 		);
290 290
 
291 291
 		$admin_settings['bank_transfer_iban'] = array(
292 292
             'type' => 'text',
293 293
             'id'   => 'bank_transfer_iban',
294
-            'name' => __( 'IBAN', 'invoicing' ),
294
+            'name' => __('IBAN', 'invoicing'),
295 295
 		);
296 296
 
297 297
 		$admin_settings['bank_transfer_bic'] = array(
298 298
             'type' => 'text',
299 299
             'id'   => 'bank_transfer_bic',
300
-            'name' => __( 'BIC/Swift Code', 'invoicing' ),
300
+            'name' => __('BIC/Swift Code', 'invoicing'),
301 301
 		);
302 302
 		
303 303
 		$admin_settings['bank_transfer_sort_code'] = array(
@@ -308,10 +308,10 @@  discard block
 block discarded – undo
308 308
 
309 309
 		$admin_settings['bank_transfer_info'] = array(
310 310
             'id'   => 'bank_transfer_info',
311
-            'name' => __( 'Instructions', 'invoicing' ),
312
-            'desc' => __( 'Instructions that will be added to the thank you page and emails.', 'invoicing' ),
311
+            'name' => __('Instructions', 'invoicing'),
312
+            'desc' => __('Instructions that will be added to the thank you page and emails.', 'invoicing'),
313 313
             'type' => 'textarea',
314
-            'std'  => __( "Make your payment directly into our bank account. Please use your Invoice Number as the payment reference. Your invoice won't be processed until the funds have cleared in our account.", 'invoicing' ),
314
+            'std'  => __("Make your payment directly into our bank account. Please use your Invoice Number as the payment reference. Your invoice won't be processed until the funds have cleared in our account.", 'invoicing'),
315 315
             'cols' => 50,
316 316
             'rows' => 5
317 317
         );
@@ -326,10 +326,10 @@  discard block
 block discarded – undo
326 326
 	 * @param GetPaid_Form_Item[] $items
327 327
 	 * @return WPInv_Invoice
328 328
 	 */
329
-	public function process_addons( $invoice, $items ) {
329
+	public function process_addons($invoice, $items) {
330 330
 
331
-        foreach ( $items as $item ) {
332
-            $invoice->add_item( $item );
331
+        foreach ($items as $item) {
332
+            $invoice->add_item($item);
333 333
         }
334 334
 
335 335
         $invoice->recalculate_total();
Please login to merge, or discard this patch.
templates/frontend-head.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 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
 
Please login to merge, or discard this patch.
templates/frontend-footer.php 1 patch
Spacing   +2 added lines, -2 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,7 +16,7 @@  discard block
 block discarded – undo
16 16
 		<div class="modal-dialog modal-dialog-centered modal-lg" role="checkout" style="max-width: 650px;">
17 17
 			<div class="modal-content">
18 18
 				<div class="modal-body">
19
-					<button type="button" class="close p-2 getpaid-payment-modal-close d-sm-none" data-dismiss="modal" aria-label="<?php esc_attr__( 'Close', 'invoicing' ); ?>">
19
+					<button type="button" class="close p-2 getpaid-payment-modal-close d-sm-none" data-dismiss="modal" aria-label="<?php esc_attr__('Close', 'invoicing'); ?>">
20 20
 						<i class="fa fa-times" aria-hidden="true"></i>
21 21
 					</button>
22 22
 					<div class="modal-body-wrapper"></div>
Please login to merge, or discard this patch.
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' ), sanitize_text_field( $vat_number ) );?>
53
+                        <?php echo wp_sprintf(__('VAT Number: %s', 'invoicing'), sanitize_text_field($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/billing-address.php 1 patch
Spacing   +13 added lines, -13 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();
@@ -21,41 +21,41 @@  discard block
 block discarded – undo
21 21
 
22 22
 
23 23
             <div class="invoice-billing-address-label col-2">
24
-                <strong><?php _e( 'To:', 'invoicing' ) ?></strong>
24
+                <strong><?php _e('To:', 'invoicing') ?></strong>
25 25
             </div>
26 26
 
27 27
 
28 28
             <div class="invoice-billing-address-value col-10">
29 29
 
30
-                <?php do_action( 'getpaid_billing_address_top' ); ?>
30
+                <?php do_action('getpaid_billing_address_top'); ?>
31 31
 
32
-                <?php if ( ! empty( $address_row ) ) : ?>
32
+                <?php if (!empty($address_row)) : ?>
33 33
                     <div class="billing-address">
34 34
                         <?php echo $address_row; ?>
35 35
                     </div>
36 36
                 <?php endif; ?>
37 37
 
38 38
 
39
-                <?php if ( ! empty( $phone ) ) : ?>
39
+                <?php if (!empty($phone)) : ?>
40 40
                     <div class="billing-phone">
41
-                        <?php echo wp_sprintf( __( 'Phone: %s', 'invoicing' ), esc_html( $phone ) ); ?>
41
+                        <?php echo wp_sprintf(__('Phone: %s', 'invoicing'), esc_html($phone)); ?>
42 42
                     </div>
43 43
                 <?php endif; ?>
44 44
 
45 45
 
46
-                <?php if ( ! empty( $email ) ) : ?>
46
+                <?php if (!empty($email)) : ?>
47 47
                     <div class="billing-email">
48
-                        <?php echo wp_sprintf( __( 'Email: %s', 'invoicing' ), sanitize_email( $email ) ); ?>
48
+                        <?php echo wp_sprintf(__('Email: %s', 'invoicing'), sanitize_email($email)); ?>
49 49
                     </div>
50 50
                 <?php endif; ?>
51 51
 
52
-                <?php if ( ! empty( $vat_number ) ) : ?>
52
+                <?php if (!empty($vat_number)) : ?>
53 53
                     <div class="vat-number">
54
-                        <?php echo wp_sprintf( __( 'Vat Number: %s', 'invoicing' ), sanitize_text_field( $vat_number ) ); ?>
54
+                        <?php echo wp_sprintf(__('Vat Number: %s', 'invoicing'), sanitize_text_field($vat_number)); ?>
55 55
                     </div>
56 56
                 <?php endif; ?>
57 57
 
58
-                <?php do_action( 'getpaid_billing_address_bottom' ); ?>
58
+                <?php do_action('getpaid_billing_address_bottom'); ?>
59 59
 
60 60
             </div>
61 61
 
Please login to merge, or discard this patch.
includes/data/tax-rates.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * @version 1.0.19
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+defined('ABSPATH') || exit;
12 12
 
13 13
 return array(
14 14
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         'global'       => true,
19 19
         'rate'         => 20,
20 20
         'reduced_rate' => 13,
21
-        'name'         => __( 'VAT', 'invoicing' ),
21
+        'name'         => __('VAT', 'invoicing'),
22 22
     ),
23 23
 
24 24
     array(
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         'global'       => true,
28 28
         'rate'         => 21,
29 29
         'reduced_rate' => 12,
30
-        'name'         => __( 'VAT', 'invoicing' ),
30
+        'name'         => __('VAT', 'invoicing'),
31 31
     ),
32 32
 
33 33
     array(
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         'global'       => true,
37 37
         'rate'         => 20,
38 38
         'reduced_rate' => 9,
39
-        'name'         => __( 'VAT', 'invoicing' ),
39
+        'name'         => __('VAT', 'invoicing'),
40 40
     ),
41 41
 
42 42
     array(
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         'global'       => true,
46 46
         'rate'         => 19,
47 47
         'reduced_rate' => 9,
48
-        'name'         => __( 'VAT', 'invoicing' ),
48
+        'name'         => __('VAT', 'invoicing'),
49 49
     ),
50 50
 
51 51
     array(
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         'global'       => true,
55 55
         'rate'         => 21,
56 56
         'reduced_rate' => 15,
57
-        'name'         => __( 'VAT', 'invoicing' ),
57
+        'name'         => __('VAT', 'invoicing'),
58 58
     ),
59 59
 
60 60
     array(
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         'global'       => true,
64 64
         'rate'         => 25,
65 65
         'reduced_rate' => 25,
66
-        'name'         => __( 'VAT', 'invoicing' ),
66
+        'name'         => __('VAT', 'invoicing'),
67 67
     ),
68 68
 
69 69
     array(
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         'global'       => true,
73 73
         'rate'         => 16,
74 74
         'reduced_rate' => 5,
75
-        'name'         => __( 'VAT', 'invoicing' ),
75
+        'name'         => __('VAT', 'invoicing'),
76 76
     ),
77 77
 
78 78
     array(
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         'global'       => true,
82 82
         'rate'         => 20,
83 83
         'reduced_rate' => 9,
84
-        'name'         => __( 'VAT', 'invoicing' ),
84
+        'name'         => __('VAT', 'invoicing'),
85 85
     ),
86 86
 
87 87
     array(
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         'global'       => true,
91 91
         'rate'         => 24,
92 92
         'reduced_rate' => 13,
93
-        'name'         => __( 'VAT', 'invoicing' ),
93
+        'name'         => __('VAT', 'invoicing'),
94 94
     ),
95 95
 
96 96
     array(
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         'global'       => true,
100 100
         'rate'         => 21,
101 101
         'reduced_rate' => 10,
102
-        'name'         => __( 'VAT', 'invoicing' ),
102
+        'name'         => __('VAT', 'invoicing'),
103 103
     ),
104 104
 
105 105
     array(
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         'global'       => true,
109 109
         'rate'         => 24,
110 110
         'reduced_rate' => 14,
111
-        'name'         => __( 'VAT', 'invoicing' ),
111
+        'name'         => __('VAT', 'invoicing'),
112 112
     ),
113 113
 
114 114
     array(
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         'global'       => true,
118 118
         'rate'         => 20,
119 119
         'reduced_rate' => 10,
120
-        'name'         => __( 'VAT', 'invoicing' ),
120
+        'name'         => __('VAT', 'invoicing'),
121 121
     ),
122 122
 
123 123
     array(
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         'global'       => true,
127 127
         'rate'         => 25,
128 128
         'reduced_rate' => 13,
129
-        'name'         => __( 'VAT', 'invoicing' ),
129
+        'name'         => __('VAT', 'invoicing'),
130 130
     ),
131 131
 
132 132
     array(
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         'global'       => true,
136 136
         'rate'         => 22,
137 137
         'reduced_rate' => 10,
138
-        'name'         => __( 'VAT', 'invoicing' ),
138
+        'name'         => __('VAT', 'invoicing'),
139 139
     ),
140 140
 
141 141
     array(
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         'global'       => true,
145 145
         'rate'         => 21,
146 146
         'reduced_rate' => 12,
147
-        'name'         => __( 'VAT', 'invoicing' ),
147
+        'name'         => __('VAT', 'invoicing'),
148 148
     ),
149 149
 
150 150
     array(
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         'global'       => true,
154 154
         'rate'         => 21,
155 155
         'reduced_rate' => 9,
156
-        'name'         => __( 'VAT', 'invoicing' ),
156
+        'name'         => __('VAT', 'invoicing'),
157 157
     ),
158 158
 
159 159
     array(
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         'global'       => true,
163 163
         'rate'         => 17,
164 164
         'reduced_rate' => 14,
165
-        'name'         => __( 'VAT', 'invoicing' ),
165
+        'name'         => __('VAT', 'invoicing'),
166 166
     ),
167 167
 
168 168
     array(
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         'global'       => true,
172 172
         'rate'         => 27,
173 173
         'reduced_rate' => 18,
174
-        'name'         => __( 'VAT', 'invoicing' ),
174
+        'name'         => __('VAT', 'invoicing'),
175 175
     ),
176 176
 
177 177
     array(
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         'global'       => true,
181 181
         'rate'         => 21,
182 182
         'reduced_rate' => 13.5,
183
-        'name'         => __( 'VAT', 'invoicing' ),
183
+        'name'         => __('VAT', 'invoicing'),
184 184
     ),
185 185
 
186 186
     array(
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         'global'       => true,
190 190
         'rate'         => 18,
191 191
         'reduced_rate' => 7,
192
-        'name'         => __( 'VAT', 'invoicing' ),
192
+        'name'         => __('VAT', 'invoicing'),
193 193
     ),
194 194
 
195 195
     array(
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         'global'       => true,
199 199
         'rate'         => 21,
200 200
         'reduced_rate' => 9,
201
-        'name'         => __( 'VAT', 'invoicing' ),
201
+        'name'         => __('VAT', 'invoicing'),
202 202
     ),
203 203
 
204 204
     array(
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         'global'       => true,
208 208
         'rate'         => 23,
209 209
         'reduced_rate' => 8,
210
-        'name'         => __( 'VAT', 'invoicing' ),
210
+        'name'         => __('VAT', 'invoicing'),
211 211
     ),
212 212
 
213 213
     array(
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         'global'       => true,
217 217
         'rate'         => 23,
218 218
         'reduced_rate' => 13,
219
-        'name'         => __( 'VAT', 'invoicing' ),
219
+        'name'         => __('VAT', 'invoicing'),
220 220
     ),
221 221
 
222 222
     array(
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
         'global'       => true,
226 226
         'rate'         => 19,
227 227
         'reduced_rate' => 9,
228
-        'name'         => __( 'VAT', 'invoicing' ),
228
+        'name'         => __('VAT', 'invoicing'),
229 229
     ),
230 230
 
231 231
     array(
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         'global'       => true,
235 235
         'rate'         => 22,
236 236
         'reduced_rate' => 9.5,
237
-        'name'         => __( 'VAT', 'invoicing' ),
237
+        'name'         => __('VAT', 'invoicing'),
238 238
     ),
239 239
 
240 240
     array(
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
         'global'       => true,
244 244
         'rate'         => 20,
245 245
         'reduced_rate' => 10,
246
-        'name'         => __( 'VAT', 'invoicing' ),
246
+        'name'         => __('VAT', 'invoicing'),
247 247
     ),
248 248
 
249 249
     array(
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
         'global'       => true,
253 253
         'rate'         => 25,
254 254
         'reduced_rate' => 12,
255
-        'name'         => __( 'VAT', 'invoicing' ),
255
+        'name'         => __('VAT', 'invoicing'),
256 256
     ),
257 257
 
258 258
     array(
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
         'global'       => true,
262 262
         'rate'         => 20,
263 263
         'reduced_rate' => 5,
264
-        'name'         => __( 'VAT', 'invoicing' ),
264
+        'name'         => __('VAT', 'invoicing'),
265 265
     )
266 266
 
267 267
 );
Please login to merge, or discard this patch.
includes/class-bp-getpaid-component.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  */
9 9
 
10 10
 // Exit if accessed directly.
11
-defined( 'ABSPATH' ) || exit;
11
+defined('ABSPATH') || exit;
12 12
 
13 13
 /**
14 14
  * Main GetPaid Class.
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 *     @type array    $meta_tables           Optional. An array of metadata table names.
56 56
 	 * }
57 57
 	 */
58
-	public function setup_globals( $args = array() ) {
58
+	public function setup_globals($args = array()) {
59 59
         parent::setup_globals(
60 60
             array(
61 61
                 'id'            => 'getpaid',
@@ -76,29 +76,29 @@  discard block
 block discarded – undo
76 76
 	 * @param array $main_nav Optional. See BP_Component::setup_nav() for description.
77 77
 	 * @param array $sub_nav  Optional. See BP_Component::setup_nav() for description.
78 78
 	 */
79
-	public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
79
+	public function setup_nav($main_nav = array(), $sub_nav = array()) {
80 80
 
81 81
 		// Abort if the integration is inactive.
82
-        if ( ! getpaid_is_buddypress_integration_active() || ! is_user_logged_in() ) {
82
+        if (!getpaid_is_buddypress_integration_active() || !is_user_logged_in()) {
83 83
             return;
84 84
         }
85 85
     
86 86
         // Or a user is not viewing their profile.
87
-        if ( bp_displayed_user_id() != bp_loggedin_user_id() ) {
87
+        if (bp_displayed_user_id() != bp_loggedin_user_id()) {
88 88
             return;
89 89
         }
90 90
 
91 91
 		// Determine user to use.
92 92
 		$user_domain   = bp_loggedin_user_domain();
93 93
 		$slug          = 'getpaid';
94
-		$payments_link = trailingslashit( $user_domain . $slug );
94
+		$payments_link = trailingslashit($user_domain . $slug);
95 95
 
96 96
 		// Add 'Payments' to the main navigation.
97 97
 		$main_nav = array(
98
-			'name'                => _x( 'Billing', 'BuddyPress profile payments screen nav', 'invoicing' ),
98
+			'name'                => _x('Billing', 'BuddyPress profile payments screen nav', 'invoicing'),
99 99
 			'slug'                => $slug,
100
-			'position'            => apply_filters( 'wpinv_bp_nav_position', wpinv_get_option( 'wpinv_menu_position', 91 ), $slug ),
101
-			'screen_function'     => array( $this, 'display_current_tab' ),
100
+			'position'            => apply_filters('wpinv_bp_nav_position', wpinv_get_option('wpinv_menu_position', 91), $slug),
101
+			'screen_function'     => array($this, 'display_current_tab'),
102 102
 			'default_subnav_slug' => 'gp-edit-address',
103 103
             'show_for_displayed_user' => false,
104 104
 			'item_css_id'         => $this->id,
@@ -107,15 +107,15 @@  discard block
 block discarded – undo
107 107
 		);
108 108
 
109 109
 		// Add the subnav items to the payments nav item if we are using a theme that supports this.
110
-        foreach ( getpaid_get_user_content_tabs() as $_slug => $tab ) {
110
+        foreach (getpaid_get_user_content_tabs() as $_slug => $tab) {
111 111
 
112 112
             $sub_nav[] = array(
113
-                'name'            => $tab[ 'label'],
113
+                'name'            => $tab['label'],
114 114
                 'slug'            => $_slug,
115 115
                 'parent_url'      => $payments_link,
116 116
                 'parent_slug'     => $slug,
117 117
                 'position' => 10,
118
-                'screen_function'        => function() use ( $tab ) {
118
+                'screen_function'        => function() use ($tab) {
119 119
 					$GLOBALS['getpaid_bp_current_tab'] = $tab;
120 120
 					$this->display_current_tab();
121 121
                 },
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
         }
127 127
 
128
-		parent::setup_nav( $main_nav, $sub_nav );
128
+		parent::setup_nav($main_nav, $sub_nav);
129 129
 	}
130 130
 
131 131
 	/**
@@ -139,29 +139,29 @@  discard block
 block discarded – undo
139 139
 	 * @param array $wp_admin_nav See BP_Component::setup_admin_bar() for a
140 140
 	 *                            description.
141 141
 	 */
142
-	public function setup_admin_bar( $wp_admin_nav = array() ) {
142
+	public function setup_admin_bar($wp_admin_nav = array()) {
143 143
 
144 144
 		// Menus for logged in user.
145
-		if ( is_user_logged_in() ) {
145
+		if (is_user_logged_in()) {
146 146
 
147 147
 			// Setup the logged in user variables.
148
-			$payments_link = trailingslashit( bp_loggedin_user_domain() . 'getpaid/' );
148
+			$payments_link = trailingslashit(bp_loggedin_user_domain() . 'getpaid/');
149 149
 
150 150
             // Add the "Payments" sub menu.
151 151
             $wp_admin_nav[] = array(
152 152
                 'parent' => buddypress()->my_account_menu_id,
153 153
                 'id'     => 'my-account-getpaid',
154
-                'title'  => _x( 'Billing', 'BuddyPress my account payments sub nav', 'invoicing' ),
154
+                'title'  => _x('Billing', 'BuddyPress my account payments sub nav', 'invoicing'),
155 155
                 'href'   => $payments_link . 'gp-edit-address'
156 156
             );
157 157
 
158
-            foreach ( getpaid_get_user_content_tabs() as $slug => $tab ) {
158
+            foreach (getpaid_get_user_content_tabs() as $slug => $tab) {
159 159
 
160 160
                 $wp_admin_nav[] = array(
161 161
                     'parent'   => 'my-account-getpaid',
162 162
                     'id'       => 'my-account-getpaid' . $slug,
163
-                    'title'    => $tab[ 'label'],
164
-                    'href'     => trailingslashit( $payments_link . $slug ),
163
+                    'title'    => $tab['label'],
164
+                    'href'     => trailingslashit($payments_link . $slug),
165 165
                     'position' => 20
166 166
                 );
167 167
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
 		}
171 171
 
172
-		parent::setup_admin_bar( $wp_admin_nav );
172
+		parent::setup_admin_bar($wp_admin_nav);
173 173
 	}
174 174
 
175 175
 	/**
@@ -180,9 +180,9 @@  discard block
 block discarded – undo
180 180
 	public function get_current_tab() {
181 181
 		global $getpaid_bp_current_tab;
182 182
 
183
-		if ( empty( $getpaid_bp_current_tab ) ) {
183
+		if (empty($getpaid_bp_current_tab)) {
184 184
 			return array(
185
-				'label'     => __( 'Invoices', 'invoicing' ),
185
+				'label'     => __('Invoices', 'invoicing'),
186 186
 				'content'   => '[wpinv_history]',
187 187
 				'icon'      => 'fas fa-file-invoice',
188 188
 			);
@@ -198,10 +198,10 @@  discard block
 block discarded – undo
198 198
 	 */
199 199
 	public function display_current_tab() {
200 200
 
201
-		add_action( 'bp_template_content', array( $this, 'handle_display_current_tab' ) );
202
-		$template = apply_filters( 'bp_core_template_plugin', 'members/single/plugins' );
201
+		add_action('bp_template_content', array($this, 'handle_display_current_tab'));
202
+		$template = apply_filters('bp_core_template_plugin', 'members/single/plugins');
203 203
 
204
-        bp_core_load_template( apply_filters( 'wpinv_bp_core_template_plugin', $template ) );
204
+        bp_core_load_template(apply_filters('wpinv_bp_core_template_plugin', $template));
205 205
 	}
206 206
 
207 207
 	/**
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 	 * @since 2.1.5
211 211
 	 */
212 212
 	public function handle_display_current_tab() {
213
-		echo getpaid_prepare_user_content_tab( $this->get_current_tab() );
213
+		echo getpaid_prepare_user_content_tab($this->get_current_tab());
214 214
 	}
215 215
 
216 216
 }
Please login to merge, or discard this patch.