Made it to level 6!

This commit is contained in:
James Cole
2025-01-04 15:16:11 +01:00
parent 54d0433dd4
commit 5602715c96
35 changed files with 99 additions and 103 deletions

View File

@@ -39,7 +39,7 @@ class OwnerTestNotificationEmail extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function toArray(OwnerNotifiable $notifiable)
public function toArray(OwnerNotifiable $notifiable): array
{
return [
];
@@ -48,7 +48,7 @@ class OwnerTestNotificationEmail extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function toMail(OwnerNotifiable $notifiable)
public function toMail(OwnerNotifiable $notifiable): MailMessage
{
$address = (string) config('firefly.site_owner');
@@ -61,7 +61,7 @@ class OwnerTestNotificationEmail extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function via(OwnerNotifiable $notifiable)
public function via(OwnerNotifiable $notifiable): array
{
return ['mail'];
}

View File

@@ -42,10 +42,8 @@ class OwnerTestNotificationNtfy extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*
* @param mixed $notifiable
*/
public function toArray($notifiable)
public function toArray(OwnerNotifiable $notifiable): array
{
return [
];
@@ -69,7 +67,7 @@ class OwnerTestNotificationNtfy extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function via(OwnerNotifiable $notifiable)
public function via(OwnerNotifiable $notifiable): array
{
return [NtfyChannel::class];
}

View File

@@ -43,7 +43,7 @@ class OwnerTestNotificationPushover extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function toArray(OwnerNotifiable $notifiable)
public function toArray(OwnerNotifiable $notifiable): array
{
return [
];
@@ -64,7 +64,7 @@ class OwnerTestNotificationPushover extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function via(OwnerNotifiable $notifiable)
public function via(OwnerNotifiable $notifiable): array
{
return [PushoverChannel::class];
}

View File

@@ -41,7 +41,7 @@ class OwnerTestNotificationSlack extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function toArray(OwnerNotifiable $notifiable)
public function toArray(OwnerNotifiable $notifiable): array
{
return [
];
@@ -50,7 +50,7 @@ class OwnerTestNotificationSlack extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function toSlack(OwnerNotifiable $notifiable)
public function toSlack(OwnerNotifiable $notifiable): SlackMessage
{
return new SlackMessage()->content((string) trans('email.admin_test_subject'));
// return new SlackMessage()->text((string) trans('email.admin_test_subject'))->to($url);
@@ -59,7 +59,7 @@ class OwnerTestNotificationSlack extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function via(OwnerNotifiable $notifiable)
public function via(OwnerNotifiable $notifiable): array
{
return ['slack'];
}

View File

@@ -39,13 +39,13 @@ class UserTestNotificationEmail extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function toArray(User $notifiable)
public function toArray(User $notifiable): array
{
return [
];
}
public function toMail(User $notifiable)
public function toMail(User $notifiable): MailMessage
{
$address = (string) $notifiable->email;
@@ -58,7 +58,7 @@ class UserTestNotificationEmail extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function via(User $notifiable)
public function via(User $notifiable): array
{
return ['mail'];
}

View File

@@ -43,7 +43,7 @@ class UserTestNotificationNtfy extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function toArray(User $notifiable)
public function toArray(User $notifiable): array
{
return [
];
@@ -67,7 +67,7 @@ class UserTestNotificationNtfy extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function via(User $user)
public function via(User $user): array
{
return [NtfyChannel::class];
}

View File

@@ -43,7 +43,7 @@ class UserTestNotificationPushover extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function toArray(User $notifiable)
public function toArray(User $notifiable): array
{
return [
];
@@ -64,7 +64,7 @@ class UserTestNotificationPushover extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function via(User $notifiable)
public function via(User $notifiable): array
{
return [PushoverChannel::class];
}

View File

@@ -41,7 +41,7 @@ class UserTestNotificationSlack extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function toArray(User $user)
public function toArray(User $user): array
{
return [
];
@@ -50,7 +50,7 @@ class UserTestNotificationSlack extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function toSlack(User $user)
public function toSlack(User $user): SlackMessage
{
return new SlackMessage()->content((string) trans('email.admin_test_subject'));
// return new SlackMessage()->text((string) trans('email.admin_test_subject'))->to($url);
@@ -59,7 +59,7 @@ class UserTestNotificationSlack extends Notification
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function via(User $user)
public function via(User $user): array
{
return ['slack'];
}