Completed
Push — master ( 0904dc...f078ca )
by
unknown
08:54
created
src/bp-groups/classes/class-bp-groups-group.php 1 patch
Switch Indentation   +88 added lines, -88 removed lines patch added patch discarded remove patch
@@ -417,41 +417,41 @@  discard block
 block discarded – undo
417 417
 	 */
418 418
 	public function __get( $key ) {
419 419
 		switch ( $key ) {
420
-			case 'last_activity' :
421
-			case 'total_member_count' :
422
-			case 'forum_id' :
423
-				$retval = groups_get_groupmeta( $this->id, $key );
420
+		case 'last_activity' :
421
+		case 'total_member_count' :
422
+		case 'forum_id' :
423
+			$retval = groups_get_groupmeta( $this->id, $key );
424 424
 
425
-				if ( 'last_activity' !== $key ) {
426
-					$retval = (int) $retval;
427
-				}
425
+			if ( 'last_activity' !== $key ) {
426
+				$retval = (int) $retval;
427
+			}
428 428
 
429
-				return $retval;
429
+			return $retval;
430 430
 
431
-			case 'admins' :
432
-				return $this->get_admins();
431
+		case 'admins' :
432
+			return $this->get_admins();
433 433
 
434
-			case 'mods' :
435
-				return $this->get_mods();
434
+		case 'mods' :
435
+			return $this->get_mods();
436 436
 
437
-			case 'is_member' :
438
-			case 'is_user_member' :
439
-				return $this->get_is_member();
437
+		case 'is_member' :
438
+		case 'is_user_member' :
439
+			return $this->get_is_member();
440 440
 
441
-			case 'is_invited' :
442
-				return groups_check_user_has_invite( bp_loggedin_user_id(), $this->id );
441
+		case 'is_invited' :
442
+			return groups_check_user_has_invite( bp_loggedin_user_id(), $this->id );
443 443
 
444
-			case 'is_pending' :
445
-				return groups_check_for_membership_request( bp_loggedin_user_id(), $this->id );
444
+		case 'is_pending' :
445
+			return groups_check_for_membership_request( bp_loggedin_user_id(), $this->id );
446 446
 
447
-			case 'user_has_access' :
448
-				return $this->get_user_has_access();
447
+		case 'user_has_access' :
448
+			return $this->get_user_has_access();
449 449
 
450
-			case 'is_visible' :
451
-				return $this->is_visible();
450
+		case 'is_visible' :
451
+			return $this->is_visible();
452 452
 
453
-			default :
454
-				return isset( $this->{$key} ) ? $this->{$key} : null;
453
+		default :
454
+			return isset( $this->{$key} ) ? $this->{$key} : null;
455 455
 		}
456 456
 	}
457 457
 
@@ -468,21 +468,21 @@  discard block
 block discarded – undo
468 468
 	 */
469 469
 	public function __isset( $key ) {
470 470
 		switch ( $key ) {
471
-			case 'admins' :
472
-			case 'is_invited' :
473
-			case 'is_member' :
474
-			case 'is_user_member' :
475
-			case 'is_pending' :
476
-			case 'last_activity' :
477
-			case 'mods' :
478
-			case 'total_member_count' :
479
-			case 'user_has_access' :
480
-			case 'is_visible' :
481
-			case 'forum_id' :
482
-				return true;
483
-
484
-			default :
485
-				return isset( $this->{$key} );
471
+		case 'admins' :
472
+		case 'is_invited' :
473
+		case 'is_member' :
474
+		case 'is_user_member' :
475
+		case 'is_pending' :
476
+		case 'last_activity' :
477
+		case 'mods' :
478
+		case 'total_member_count' :
479
+		case 'user_has_access' :
480
+		case 'is_visible' :
481
+		case 'forum_id' :
482
+			return true;
483
+
484
+		default :
485
+			return isset( $this->{$key} );
486 486
 		}
487 487
 	}
488 488
 
@@ -500,11 +500,11 @@  discard block
 block discarded – undo
500 500
 	 */
501 501
 	public function __set( $key, $value ) {
502 502
 		switch ( $key ) {
503
-			case 'user_has_access' :
504
-				return $this->user_has_access = (bool) $value;
503
+		case 'user_has_access' :
504
+			return $this->user_has_access = (bool) $value;
505 505
 
506
-			default :
507
-				$this->{$key} = $value;
506
+		default :
507
+			$this->{$key} = $value;
508 508
 		}
509 509
 	}
510 510
 
@@ -1433,30 +1433,30 @@  discard block
 block discarded – undo
1433 1433
 		$order = $orderby = '';
1434 1434
 
1435 1435
 		switch ( $type ) {
1436
-			case 'newest' :
1437
-				$order   = 'DESC';
1438
-				$orderby = 'date_created';
1439
-				break;
1436
+		case 'newest' :
1437
+			$order   = 'DESC';
1438
+			$orderby = 'date_created';
1439
+			break;
1440 1440
 
1441
-			case 'active' :
1442
-				$order   = 'DESC';
1443
-				$orderby = 'last_activity';
1444
-				break;
1441
+		case 'active' :
1442
+			$order   = 'DESC';
1443
+			$orderby = 'last_activity';
1444
+			break;
1445 1445
 
1446
-			case 'popular' :
1447
-				$order   = 'DESC';
1448
-				$orderby = 'total_member_count';
1449
-				break;
1446
+		case 'popular' :
1447
+			$order   = 'DESC';
1448
+			$orderby = 'total_member_count';
1449
+			break;
1450 1450
 
1451
-			case 'alphabetical' :
1452
-				$order   = 'ASC';
1453
-				$orderby = 'name';
1454
-				break;
1451
+		case 'alphabetical' :
1452
+			$order   = 'ASC';
1453
+			$orderby = 'name';
1454
+			break;
1455 1455
 
1456
-			case 'random' :
1457
-				$order   = '';
1458
-				$orderby = 'random';
1459
-				break;
1456
+		case 'random' :
1457
+			$order   = '';
1458
+			$orderby = 'random';
1459
+			break;
1460 1460
 		}
1461 1461
 
1462 1462
 		return array( 'order' => $order, 'orderby' => $orderby );
@@ -1474,30 +1474,30 @@  discard block
 block discarded – undo
1474 1474
 		$order_by_term = '';
1475 1475
 
1476 1476
 		switch ( $orderby ) {
1477
-			case 'date_created' :
1478
-			default :
1479
-				$order_by_term = 'g.date_created';
1480
-				break;
1481
-
1482
-			case 'last_activity' :
1483
-				$order_by_term = 'gm_last_activity.meta_value';
1484
-				break;
1485
-
1486
-			case 'total_member_count' :
1487
-				$order_by_term = 'CONVERT(gm_total_member_count.meta_value, SIGNED)';
1488
-				break;
1489
-
1490
-			case 'name' :
1491
-				$order_by_term = 'g.name';
1492
-				break;
1493
-
1494
-			case 'random' :
1495
-				$order_by_term = 'rand()';
1496
-				break;
1497
-
1498
-			case 'meta_id' :
1499
-				$order_by_term = buddypress()->groups->table_name_groupmeta . '.id';
1500
-				break;
1477
+		case 'date_created' :
1478
+		default :
1479
+			$order_by_term = 'g.date_created';
1480
+			break;
1481
+
1482
+		case 'last_activity' :
1483
+			$order_by_term = 'gm_last_activity.meta_value';
1484
+			break;
1485
+
1486
+		case 'total_member_count' :
1487
+			$order_by_term = 'CONVERT(gm_total_member_count.meta_value, SIGNED)';
1488
+			break;
1489
+
1490
+		case 'name' :
1491
+			$order_by_term = 'g.name';
1492
+			break;
1493
+
1494
+		case 'random' :
1495
+			$order_by_term = 'rand()';
1496
+			break;
1497
+
1498
+		case 'meta_id' :
1499
+			$order_by_term = buddypress()->groups->table_name_groupmeta . '.id';
1500
+			break;
1501 1501
 		}
1502 1502
 
1503 1503
 		return $order_by_term;
Please login to merge, or discard this patch.