Completed
Pull Request — master (#517)
by Chris
15:12
created
includes/admin/EDD_SL_Plugin_Updater.php 1 patch
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,7 +4,9 @@  discard block
 block discarded – undo
4 4
 //set_site_transient( 'update_plugins', null );
5 5
 
6 6
 // Exit if accessed directly
7
-if ( ! defined( 'ABSPATH' ) ) exit;
7
+if ( ! defined( 'ABSPATH' ) ) {
8
+	exit;
9
+}
8 10
 
9 11
 /**
10 12
  * Allows plugins to use their own update API.
@@ -273,11 +275,13 @@  discard block
 block discarded – undo
273 275
 
274 276
         $data = array_merge( $this->api_data, $_data );
275 277
 
276
-        if ( $data['slug'] != $this->slug )
277
-            return;
278
+        if ( $data['slug'] != $this->slug ) {
279
+                    return;
280
+        }
278 281
 
279
-        if ( empty( $data['license'] ) )
280
-            return;
282
+        if ( empty( $data['license'] ) ) {
283
+                    return;
284
+        }
281 285
 
282 286
         if( $this->api_url == home_url() ) {
283 287
             return false; // Don't allow a plugin to ping itself
Please login to merge, or discard this patch.
includes/admin/customers/customers.php 1 patch
Braces   +25 added lines, -10 removed lines patch added patch discarded remove patch
@@ -259,8 +259,11 @@  discard block
 block discarded – undo
259 259
 								<span class="customer-user-id info-item editable">
260 260
 									<?php if ( intval( $customer->user_id ) > 0 ) : ?>
261 261
 										<span data-key="user_id"><?php echo $customer->user_id; ?></span>
262
-									<?php else : ?>
263
-										<span data-key="user_id"><?php _e( 'none', 'give' ); ?></span>
262
+									<?php else {
263
+	: ?>
264
+										<span data-key="user_id"><?php _e( 'none', 'give' );
265
+}
266
+?></span>
264 267
 									<?php endif; ?>
265 268
 									<?php if ( current_user_can( $customer_edit_role ) && intval( $customer->user_id ) > 0 ) : ?>
266 269
 										<span class="disconnect-user"> - <a id="disconnect-customer" href="#disconnect" title="<?php _e( 'Disconnects the current user ID from this customer record', 'give' ); ?>"><?php _e( 'Disconnect User', 'give' ); ?></a></span>
@@ -329,8 +332,11 @@  discard block
 block discarded – undo
329 332
 													}
330 333
 													?>
331 334
 												</select>
332
-											<?php else : ?>
333
-												<input type="text" size="6" data-key="state" name="customerinfo[state]" id="card_state" class="card_state give-input info-item" placeholder="<?php _e( 'State / Province', 'give' ); ?>" />
335
+											<?php else {
336
+	: ?>
337
+												<input type="text" size="6" data-key="state" name="customerinfo[state]" id="card_state" class="card_state give-input info-item" placeholder="<?php _e( 'State / Province', 'give' );
338
+}
339
+?>" />
334 340
 											<?php endif; ?>
335 341
 											<input class="info-item" type="text" data-key="zip" name="customerinfo[zip]" placeholder="<?php _e( 'Postal', 'give' ); ?>" value="<?php echo $address['zip']; ?>" />
336 342
 													</span>
@@ -416,9 +422,12 @@  discard block
 block discarded – undo
416 422
 						</td>
417 423
 					</tr>
418 424
 				<?php endforeach; ?>
419
-			<?php else: ?>
425
+			<?php else {
426
+	: ?>
420 427
 				<tr>
421
-					<td colspan="5"><?php _e( 'No Donations Found', 'give' ); ?></td>
428
+					<td colspan="5"><?php _e( 'No Donations Found', 'give' );
429
+}
430
+?></td>
422 431
 				</tr>
423 432
 			<?php endif; ?>
424 433
 			</tbody>
@@ -447,9 +456,12 @@  discard block
 block discarded – undo
447 456
 						</td>
448 457
 					</tr>
449 458
 				<?php endforeach; ?>
450
-			<?php else: ?>
459
+			<?php else {
460
+	: ?>
451 461
 				<tr>
452
-					<td colspan="2"><?php _e( 'No Completed Donations Found', 'give' ); ?></td>
462
+					<td colspan="2"><?php _e( 'No Completed Donations Found', 'give' );
463
+}
464
+?></td>
453 465
 				</tr>
454 466
 			<?php endif; ?>
455 467
 			</tbody>
@@ -523,9 +535,12 @@  discard block
 block discarded – undo
523 535
 					</span>
524 536
 					</div>
525 537
 				<?php endforeach; ?>
526
-			<?php else: ?>
538
+			<?php else {
539
+	: ?>
527 540
 				<div class="give-no-customer-notes">
528
-					<?php _e( 'No Donor Notes', 'give' ); ?>
541
+					<?php _e( 'No Donor Notes', 'give' );
542
+}
543
+?>
529 544
 				</div>
530 545
 			<?php endif; ?>
531 546
 		</div>
Please login to merge, or discard this patch.
includes/admin/payments/payments-history.php 1 patch
Braces   +15 added lines, -9 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@  discard block
 block discarded – undo
10 10
 */
11 11
 
12 12
 // Exit if accessed directly
13
-if ( ! defined( 'ABSPATH' ) ) exit;
13
+if ( ! defined( 'ABSPATH' ) ) {
14
+	exit;
15
+}
14 16
 
15 17
 /**
16 18
  * Payment History Page
@@ -63,11 +65,13 @@  discard block
 block discarded – undo
63 65
  */
64 66
 function give_view_order_details_title( $admin_title, $title ) {
65 67
 
66
-	if ( 'give_forms_page_give-payment-history' != get_current_screen()->base )
67
-		return $admin_title;
68
+	if ( 'give_forms_page_give-payment-history' != get_current_screen()->base ) {
69
+			return $admin_title;
70
+	}
68 71
 
69
-	if( ! isset( $_GET['give-action'] ) )
70
-		return $admin_title;
72
+	if( ! isset( $_GET['give-action'] ) ) {
73
+			return $admin_title;
74
+	}
71 75
 
72 76
 	switch( $_GET['give-action'] ) :
73 77
 
@@ -99,11 +103,13 @@  discard block
 block discarded – undo
99 103
 function give_override_edit_post_for_payment_link( $url, $post_id = 0, $context ) {
100 104
 
101 105
 	$post = get_post( $post_id );
102
-	if( ! $post )
103
-		return $url;
106
+	if( ! $post ) {
107
+			return $url;
108
+	}
104 109
 
105
-	if( 'give_payment' != $post->post_type )
106
-		return $url;
110
+	if( 'give_payment' != $post->post_type ) {
111
+			return $url;
112
+	}
107 113
 
108 114
 	$url = admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&view=view-order-details&id=' . $post_id );
109 115
 
Please login to merge, or discard this patch.
includes/admin/payments/view-order-details.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -440,8 +440,10 @@
 block discarded – undo
440 440
 												echo give_get_payment_note_html( $note, $payment_id );
441 441
 
442 442
 											endforeach;
443
-										else :
443
+										else {
444
+											:
444 445
 											$no_notes_display = '';
446
+										}
445 447
 										endif;
446 448
 										echo '<p class="give-no-payment-notes"' . $no_notes_display . '>' . __( 'No payment notes', 'give' ) . '</p>';
447 449
 										?>
Please login to merge, or discard this patch.
includes/admin/reporting/graphing.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -143,9 +143,11 @@  discard block
 block discarded – undo
143 143
 
144 144
 					endwhile;
145 145
 
146
-				else :
146
+				else {
147
+					:
147 148
 
148 149
 					$sales = give_get_sales_by_date( null, $i, $y );
150
+				}
149 151
 					$sales_totals += $sales;
150 152
 
151 153
 					$earnings = give_get_earnings_by_date( null, $i, $y );
@@ -393,9 +395,11 @@  discard block
 block discarded – undo
393 395
 
394 396
 					endwhile;
395 397
 
396
-				else :
398
+				else {
399
+					:
397 400
 
398 401
 					$num_of_days = cal_days_in_month( CAL_GREGORIAN, $i, $y );
402
+				}
399 403
 
400 404
 					$date     = mktime( 0, 0, 0, $i, 1, $y );
401 405
 					$end_date = mktime( 23, 59, 59, $i, $num_of_days, $y );
Please login to merge, or discard this patch.
includes/admin/reporting/pdf-reports.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,8 +124,10 @@
 block discarded – undo
124 124
 
125 125
 			$pdf->Row( array( $title, $price, $categories, $tags, $sales, $earnings ) );
126 126
 		endforeach;
127
-	else:
127
+	else {
128
+		:
128 129
 		$pdf->SetWidths( array( 280 ) );
130
+	}
129 131
 		$title = utf8_decode( sprintf( __( 'No %s found.', 'give' ), give_get_forms_label_plural() ) );
130 132
 		$pdf->Row( array( $title ) );
131 133
 	endif;
Please login to merge, or discard this patch.
includes/admin/upgrades/upgrades.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,11 +64,14 @@
 block discarded – undo
64 64
 				}, 250 );
65 65
 			</script>
66 66
 
67
-		<?php else : ?>
67
+		<?php else {
68
+	: ?>
68 69
 
69 70
 			<div id="give-upgrade-status">
70 71
 				<p style="font-size: 20px;max-width: 900px;">
71
-					<?php _e( 'The upgrade process has started, please be patient and do not close this window or navigate away from this page. This could take several minutes depending on the upgrade and the size of your website. You will be automatically redirected when the upgrade is finished.', 'give' ); ?>
72
+					<?php _e( 'The upgrade process has started, please be patient and do not close this window or navigate away from this page. This could take several minutes depending on the upgrade and the size of your website. You will be automatically redirected when the upgrade is finished.', 'give' );
73
+}
74
+?>
72 75
 					<img src="<?php echo GIVE_PLUGIN_URL . '/assets/images/spinner.gif'; ?>" id="give-upgrade-loader" style="  position: relative; top: 3px; left: 6px;" />
73 76
 				</p>
74 77
 			</div>
Please login to merge, or discard this patch.
includes/api/class-give-api-v1.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly
13
-if ( ! defined( 'ABSPATH' ) ) exit;
13
+if ( ! defined( 'ABSPATH' ) ) {
14
+	exit;
15
+}
14 16
 
15 17
 /**
16 18
  * Give_API_V1 Class
Please login to merge, or discard this patch.
includes/class-give-donate-form.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -297,10 +297,12 @@  discard block
 block discarded – undo
297 297
 	public function decrease_sales() {
298 298
 
299 299
 		$sales = give_get_form_sales_stats( $this->ID );
300
-		if ( $sales > 0 ) // Only decrease if not already zero
300
+		if ( $sales > 0 ) {
301
+			// Only decrease if not already zero
301 302
 		{
302 303
 			$sales = $sales - 1;
303 304
 		}
305
+		}
304 306
 
305 307
 		if ( update_post_meta( $this->ID, '_give_form_sales', $sales ) ) {
306 308
 			$this->sales = $sales;
@@ -370,10 +372,12 @@  discard block
 block discarded – undo
370 372
 
371 373
 		$earnings = give_get_form_earnings_stats( $this->ID );
372 374
 
373
-		if ( $earnings > 0 ) // Only decrease if greater than zero
375
+		if ( $earnings > 0 ) {
376
+			// Only decrease if greater than zero
374 377
 		{
375 378
 			$earnings = $earnings - (float) $amount;
376 379
 		}
380
+		}
377 381
 
378 382
 		if ( update_post_meta( $this->ID, '_give_form_earnings', $earnings ) ) {
379 383
 			$this->earnings = $earnings;
Please login to merge, or discard this patch.