diff --git a/extend.php b/extend.php index 8abb8f0..2a461bf 100644 --- a/extend.php +++ b/extend.php @@ -47,8 +47,7 @@ ->add(RegisterMiddleware::class), (new Extend\Model(User::class)) - ->relationship('fofTermsPolicies', fn(AbstractModel $user): BelongsToMany => - $user + ->relationship('fofTermsPolicies', fn (AbstractModel $user): BelongsToMany => $user ->belongsToMany(Policy::class, 'fof_terms_policy_user') ->withPivot(['accepted_at', 'is_accepted'])), diff --git a/src/Repositories/PolicyRepository.php b/src/Repositories/PolicyRepository.php index 7fd46c4..eee59ef 100644 --- a/src/Repositories/PolicyRepository.php +++ b/src/Repositories/PolicyRepository.php @@ -74,6 +74,7 @@ public function state(User $user) if (!$this->rememberState) { /** * @var Collection $userPolicies + * * @phpstan-ignore-next-line */ $userPolicies = $user->fofTermsPolicies->keyBy('id');