From 99d94149133398a51d06d2f27d374382cc21d0bd Mon Sep 17 00:00:00 2001 From: miguel456 Date: Fri, 19 Aug 2022 00:51:03 +0100 Subject: [PATCH] refactor: update method signature to support permanent suspensions --- app/Services/AccountSuspensionService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/AccountSuspensionService.php b/app/Services/AccountSuspensionService.php index d737043..0624929 100755 --- a/app/Services/AccountSuspensionService.php +++ b/app/Services/AccountSuspensionService.php @@ -22,12 +22,12 @@ class AccountSuspensionService * Suspensions also block registration attempts. * * @param string $reason Suspension reason. - * @param string $duration Duration. This is a timestamp. + * @param int $duration Duration. This is a timestamp. * @param User $target Who to suspend. * @param string $type Permanent or temporary? * @return Ban The ban itself */ - public function suspend($reason, $duration, User $target, $type = "on"): Ban { + public function suspend(User $target, string $reason, int $duration = 0, string $type = "on"): Ban { Log::alert("An user account has just been suspended.", [ 'taget_email' => $target->email,