Skip to content

Commit 63a6a05

Browse files
committed
wip
1 parent 2ce2554 commit 63a6a05

File tree

5 files changed

+0
-29
lines changed

5 files changed

+0
-29
lines changed

src/Events/Event.php

-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ class Event
1313

1414
/**
1515
* Event constructor.
16-
*
17-
* @param \Illuminate\Database\Eloquent\Model $like
1816
*/
1917
public function __construct(Model $like)
2018
{

src/Like.php

-5
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ class Like extends Model
1717
'deleted' => Unliked::class,
1818
];
1919

20-
/**
21-
* @param array $attributes
22-
*/
2320
public function __construct(array $attributes = [])
2421
{
2522
$this->table = \config('like.likes_table');
@@ -63,8 +60,6 @@ public function liker()
6360
}
6461

6562
/**
66-
* @param \Illuminate\Database\Eloquent\Builder $query
67-
* @param string $type
6863
* @return \Illuminate\Database\Eloquent\Builder
6964
*/
7065
public function scopeWithType(Builder $query, string $type)

src/Traits/Likeable.php

-6
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66

77
trait Likeable
88
{
9-
/**
10-
* @param \Illuminate\Database\Eloquent\Model $user
11-
* @return bool
12-
*/
139
public function isLikedBy(Model $user): bool
1410
{
1511
if (\is_a($user, config('auth.providers.users.model'))) {
@@ -25,8 +21,6 @@ public function isLikedBy(Model $user): bool
2521

2622
/**
2723
* Return followers.
28-
*
29-
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
3024
*/
3125
public function likers(): \Illuminate\Database\Eloquent\Relations\BelongsToMany
3226
{

src/Traits/Liker.php

-12
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313

1414
trait Liker
1515
{
16-
/**
17-
* @param \Illuminate\Database\Eloquent\Model $object
18-
* @return Like
19-
*/
2016
public function like(Model $object): Like
2117
{
2218
$attributes = [
@@ -43,9 +39,6 @@ function () use ($like, $attributes) {
4339
}
4440

4541
/**
46-
* @param \Illuminate\Database\Eloquent\Model $object
47-
* @return bool
48-
*
4942
* @throws \Exception
5043
*/
5144
public function unlike(Model $object): bool
@@ -69,7 +62,6 @@ public function unlike(Model $object): bool
6962
}
7063

7164
/**
72-
* @param \Illuminate\Database\Eloquent\Model $object
7365
* @return Like|null
7466
*
7567
* @throws \Exception
@@ -79,10 +71,6 @@ public function toggleLike(Model $object)
7971
return $this->hasLiked($object) ? $this->unlike($object) : $this->like($object);
8072
}
8173

82-
/**
83-
* @param \Illuminate\Database\Eloquent\Model $object
84-
* @return bool
85-
*/
8674
public function hasLiked(Model $object): bool
8775
{
8876
return ($this->relationLoaded('likes') ? $this->likes : $this->likes())

tests/FeatureTest.php

-4
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,6 @@ public function test_liker_can_attach_like_status_to_votable_collection()
233233
$this->assertFalse($posts[2]['post']['has_liked']);
234234
}
235235

236-
/**
237-
* @param \Closure $callback
238-
* @return \Illuminate\Support\Collection
239-
*/
240236
protected function getQueryLog(\Closure $callback): \Illuminate\Support\Collection
241237
{
242238
$sqls = \collect([]);

0 commit comments

Comments
 (0)