diff --git a/src/app/SignupCode.php b/src/app/SignupCode.php index 73ecd7af..0e5e1559 100644 --- a/src/app/SignupCode.php +++ b/src/app/SignupCode.php @@ -1,106 +1,106 @@ 'array']; /** * The attributes that should be mutated to dates. * * @var array */ protected $dates = ['expires_at']; /** * Check if code is expired. * * @return bool True if code is expired, False otherwise */ public function isExpired() { // @phpstan-ignore-next-line return $this->expires_at ? Carbon::now()->gte($this->expires_at) : false; } /** * Generate a short code (for human). * * @return string */ public static function generateShortCode(): string { $code_length = env('SIGNUP_CODE_LENGTH', self::SHORTCODE_LENGTH); return \App\Utils::randStr($code_length); } }