Skip to content

Commit e48e749

Browse files
committed
fix: update method annotations in traits to include generics for MorphOne and MorphMany
1 parent 15d1bbc commit e48e749

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Traits/InteractionRelationship.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* @package CSlant\LaravelLike\Traits
1515
* @mixin Model
1616
*
17-
* @method MorphOne morphOne(string $related, string $name, string $type = null, string $id = null, string $localKey = null)
18-
* @method MorphMany morphMany(string $related, string $name, string $type = null, string $id = null, string $localKey = null)
17+
* @method MorphOne<self, Model> morphOne(string $related, string $name, string $type = null, string $id = null, string $localKey = null)
18+
* @method MorphMany<self, Model> morphMany(string $related, string $name, string $type = null, string $id = null, string $localKey = null)
1919
*/
2020
trait InteractionRelationship
2121
{

src/Traits/Like/LikeScopes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
* @package CSlant\LaravelLike\Traits\Like
1414
* @mixin Model
1515
*
16-
* @method MorphOne likeOne()
17-
* @method MorphMany likes()
16+
* @method MorphOne<self, Model> likeOne()
17+
* @method MorphMany<self, Model> likes()
1818
* @method bool isInteractedBy(int $userId, null|InteractionTypeEnum $type)
1919
*/
2020
trait LikeScopes

src/Traits/Love/LoveScope.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
* @package CSlant\LaravelLike\Traits\Love
1414
* @mixin Model
1515
*
16-
* @method MorphOne likeOne()
17-
* @method MorphMany likes()
16+
* @method MorphOne<self, Model> likeOne()
17+
* @method MorphMany<self, Model> likes()
1818
* @method bool isInteractedBy(int $userId, null|InteractionTypeEnum $type)
1919
*/
2020
trait LoveScope

0 commit comments

Comments
 (0)