@@ -9,7 +9,8 @@ trait LaravelFollow
9
9
{
10
10
/**
11
11
* Follow the given user.
12
- * @param mixed $user
12
+ *
13
+ * @param mixed $user
13
14
* @return void
14
15
*/
15
16
public function follow (mixed $ user ): void
@@ -24,7 +25,8 @@ public function follow(mixed $user): void
24
25
25
26
/**
26
27
* Unfollow the given user.
27
- * @param mixed $user
28
+ *
29
+ * @param mixed $user
28
30
* @return void
29
31
*/
30
32
public function unfollow (mixed $ user ): void
@@ -38,7 +40,8 @@ public function unfollow(mixed $user): void
38
40
39
41
/**
40
42
* Check if a user is following the given user.
41
- * @param mixed $user
43
+ *
44
+ * @param mixed $user
42
45
* @return bool
43
46
*/
44
47
public function isFollowing (mixed $ user ): bool
@@ -67,7 +70,8 @@ public function isFollowing(mixed $user): bool
67
70
68
71
/**
69
72
* Check if a user is followed by the given user.
70
- * @param mixed $user
73
+ *
74
+ * @param mixed $user
71
75
* @return bool
72
76
*/
73
77
public function isFollowedBy (mixed $ user ): bool
@@ -96,6 +100,7 @@ public function isFollowedBy(mixed $user): bool
96
100
97
101
/**
98
102
* Returns the users a user is following.
103
+ *
99
104
* @return \Illuminate\Database\Eloquent\Collection
100
105
*/
101
106
public function getFollowing (): \Illuminate \Database \Eloquent \Collection
@@ -107,6 +112,7 @@ public function getFollowing(): \Illuminate\Database\Eloquent\Collection
107
112
108
113
/**
109
114
* Returns the users who are following a user.
115
+ *
110
116
* @return \Illuminate\Database\Eloquent\Collection
111
117
*/
112
118
public function getFollowers (): \Illuminate \Database \Eloquent \Collection
@@ -118,6 +124,7 @@ public function getFollowers(): \Illuminate\Database\Eloquent\Collection
118
124
119
125
/**
120
126
* Returns IDs of the users a user is following.
127
+ *
121
128
* @return array
122
129
*/
123
130
public function getFollowingIds (): array
@@ -130,6 +137,7 @@ public function getFollowingIds(): array
130
137
131
138
/**
132
139
* Returns IDs of the users who are following a user.
140
+ *
133
141
* @return array
134
142
*/
135
143
public function getFollowersIds (): array
@@ -143,6 +151,7 @@ public function getFollowersIds(): array
143
151
/**
144
152
* Returns IDs of the users a user is following.
145
153
* Returns IDs of the users who are following a user.
154
+ *
146
155
* @return array
147
156
*/
148
157
public function getFollowingAndFollowersIds (): array
@@ -155,7 +164,8 @@ public function getFollowingAndFollowersIds(): array
155
164
156
165
/**
157
166
* Caches IDs of the users a user is following.
158
- * @param mixed $duration
167
+ *
168
+ * @param mixed $duration
159
169
* @return void
160
170
*/
161
171
public function cacheFollowing (mixed $ duration = null ): void
@@ -171,7 +181,8 @@ public function cacheFollowing(mixed $duration = null): void
171
181
172
182
/**
173
183
* Caches IDs of the users who are following a user.
174
- * @param mixed|null $duration
184
+ *
185
+ * @param mixed|null $duration
175
186
* @return void
176
187
*/
177
188
public function cacheFollowers (mixed $ duration = null ): void
@@ -187,7 +198,9 @@ public function cacheFollowers(mixed $duration = null): void
187
198
188
199
/**
189
200
* Returns the cached IDs of the users a user is following.
201
+ *
190
202
* @return array
203
+ *
191
204
* @throws
192
205
*/
193
206
public function getFollowingCache (): array
@@ -197,7 +210,9 @@ public function getFollowingCache(): array
197
210
198
211
/**
199
212
* Returns the cached IDs of the users who are followers a user.
213
+ *
200
214
* @return array
215
+ *
201
216
* @throws
202
217
*/
203
218
public function getFollowersCache (): array
@@ -207,6 +222,7 @@ public function getFollowersCache(): array
207
222
208
223
/**
209
224
* Clears the Following cache.
225
+ *
210
226
* @return void
211
227
*/
212
228
public function clearFollowingCache (): void
@@ -216,6 +232,7 @@ public function clearFollowingCache(): void
216
232
217
233
/**
218
234
* Clears the Followers cache.
235
+ *
219
236
* @return void
220
237
*/
221
238
public function clearFollowersCache (): void
0 commit comments