mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-10 20:34:48 +00:00
Clean up code.
This commit is contained in:
@@ -37,6 +37,7 @@ use Ntfy\Message;
|
||||
class UnknownUserLoginAttempt extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
private string $address;
|
||||
|
||||
public function __construct(string $address)
|
||||
@@ -60,28 +61,7 @@ class UnknownUserLoginAttempt extends Notification
|
||||
{
|
||||
return new MailMessage()
|
||||
->markdown('emails.owner.unknown-user', ['address' => $this->address])
|
||||
->subject((string) trans('email.unknown_user_subject'))
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*/
|
||||
public function toSlack(OwnerNotifiable $notifiable): SlackMessage
|
||||
{
|
||||
return new SlackMessage()->content(
|
||||
(string) trans('email.unknown_user_body', ['address' => $this->address])
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*/
|
||||
public function toPushover(OwnerNotifiable $notifiable): PushoverMessage
|
||||
{
|
||||
return PushoverMessage::create((string) trans('email.unknown_user_message', ['address' => $this->address]))
|
||||
->title((string) trans('email.unknown_user_subject'))
|
||||
;
|
||||
->subject((string) trans('email.unknown_user_subject'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,6 +78,25 @@ class UnknownUserLoginAttempt extends Notification
|
||||
return $message;
|
||||
}
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*/
|
||||
public function toPushover(OwnerNotifiable $notifiable): PushoverMessage
|
||||
{
|
||||
return PushoverMessage::create((string) trans('email.unknown_user_message', ['address' => $this->address]))
|
||||
->title((string) trans('email.unknown_user_subject'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*/
|
||||
public function toSlack(OwnerNotifiable $notifiable): SlackMessage
|
||||
{
|
||||
return new SlackMessage()->content(
|
||||
(string) trans('email.unknown_user_body', ['address' => $this->address])
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user