Completed
Push — develop ( da3211...921ac0 )
by J.D.
02:14
created
src/classes/entity/restriction/message/thread/accessible.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	/**
37 37
 	 * @since 1.0.0
38 38
 	 */
39
-	public function __construct( $entity_id, array $hierarchy ) {
39
+	public function __construct($entity_id, array $hierarchy) {
40 40
 
41 41
 		$this->entity_id = $entity_id;
42 42
 		$this->thread_id = $this->get_thread_id();
@@ -45,18 +45,18 @@  discard block
 block discarded – undo
45 45
 	/**
46 46
 	 * @since 1.0.0
47 47
 	 */
48
-	public function user_can( $user_id ) {
48
+	public function user_can($user_id) {
49 49
 
50 50
 		// Moderators are allowed to view conversations.
51
-		if ( bp_user_can( $user_id, 'bp_moderate' ) ) {
51
+		if (bp_user_can($user_id, 'bp_moderate')) {
52 52
 			return true;
53 53
 		}
54 54
 
55
-		if ( ! $this->thread_id ) {
55
+		if ( ! $this->thread_id) {
56 56
 			return false;
57 57
 		}
58 58
 
59
-		return (bool) messages_check_thread_access( $this->thread_id, $user_id );
59
+		return (bool) messages_check_thread_access($this->thread_id, $user_id);
60 60
 	}
61 61
 
62 62
 	/**
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
 	 */
76 76
 	protected function get_thread_id() {
77 77
 
78
-		$message = new BP_Messages_Message( $this->entity_id );
78
+		$message = new BP_Messages_Message($this->entity_id);
79 79
 
80
-		if ( ! $message->id ) {
80
+		if ( ! $message->id) {
81 81
 			return false;
82 82
 		}
83 83
 
Please login to merge, or discard this patch.
src/classes/entity/restriction/group/status/nonpublic.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,19 +45,19 @@  discard block
 block discarded – undo
45 45
 	/**
46 46
 	 * @since 1.0.0
47 47
 	 */
48
-	public function __construct( $entity_id, array $hierarchy ) {
48
+	public function __construct($entity_id, array $hierarchy) {
49 49
 
50 50
 		$this->entity_id = $entity_id;
51 51
 		$this->group_id = $this->get_group_id();
52 52
 
53
-		$group = groups_get_group( $this->group_id );
53
+		$group = groups_get_group($this->group_id);
54 54
 
55 55
 		// Note that if the group doesn't exist, the status won't be set.
56
-		if ( ! $group->id ) {
56
+		if ( ! $group->id) {
57 57
 
58 58
 			$this->applies = true;
59 59
 
60
-		} elseif ( 'public' !== $group->status ) {
60
+		} elseif ('public' !== $group->status) {
61 61
 
62 62
 			/**
63 63
 			 * Filters whether the Status Nonpublic restriction applies to a group.
@@ -82,19 +82,19 @@  discard block
 block discarded – undo
82 82
 	/**
83 83
 	 * @since 1.0.0
84 84
 	 */
85
-	public function user_can( $user_id ) {
85
+	public function user_can($user_id) {
86 86
 
87
-		if ( ! $this->applies ) {
87
+		if ( ! $this->applies) {
88 88
 			return true;
89 89
 		}
90 90
 
91 91
 		// Moderators are allowed to view all groups.
92
-		if ( bp_user_can( $user_id, 'bp_moderate' ) ) {
92
+		if (bp_user_can($user_id, 'bp_moderate')) {
93 93
 			return true;
94 94
 		}
95 95
 
96 96
 		// Group members can view the group.
97
-		if ( groups_is_user_member( $user_id, $this->group_id ) ) {
97
+		if (groups_is_user_member($user_id, $this->group_id)) {
98 98
 			return true;
99 99
 		}
100 100
 
Please login to merge, or discard this patch.