chore: code refactor via rector
This commit is contained in:
@@ -42,13 +42,13 @@ class RemoteEmail extends Model
|
||||
public static function fetchEmailFromDB($email)
|
||||
{
|
||||
$validator = Validator::make(['email' => $email], [
|
||||
'email' => 'required|email',
|
||||
'email' => ['required', 'email'],
|
||||
]);
|
||||
|
||||
if ($validator->fails()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return self::whereJsonContains('to', $email)->orderBy('timestamp', 'desc')->get();
|
||||
return self::query()->whereJsonContains('to', $email)->orderBy('timestamp', 'desc')->get();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user