refactor: update method signature to support permanent suspensions
This commit is contained in:
parent
7556cf5bdf
commit
99d9414913
@ -22,12 +22,12 @@ class AccountSuspensionService
|
|||||||
* Suspensions also block registration attempts.
|
* Suspensions also block registration attempts.
|
||||||
*
|
*
|
||||||
* @param string $reason Suspension reason.
|
* @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 User $target Who to suspend.
|
||||||
* @param string $type Permanent or temporary?
|
* @param string $type Permanent or temporary?
|
||||||
* @return Ban The ban itself
|
* @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.", [
|
Log::alert("An user account has just been suspended.", [
|
||||||
'taget_email' => $target->email,
|
'taget_email' => $target->email,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user