Upgrade to Laravel 9 (#4413)

Co-authored-by: DaneEveritt <dane@daneeveritt.com>
This commit is contained in:
Matthew Penner 2022-10-14 10:59:20 -06:00 committed by GitHub
parent 95e15d2c8a
commit cbcf62086f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
573 changed files with 4387 additions and 9411 deletions

View file

@ -2,9 +2,12 @@
namespace Pterodactyl\Notifications;
use Pterodactyl\Models\User;
use Illuminate\Bus\Queueable;
use Pterodactyl\Events\Event;
use Pterodactyl\Models\Server;
use Illuminate\Container\Container;
use Pterodactyl\Events\Server\Installed;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Pterodactyl\Contracts\Core\ReceivesEvents;
@ -15,23 +18,15 @@ class ServerInstalled extends Notification implements ShouldQueue, ReceivesEvent
{
use Queueable;
/**
* @var \Pterodactyl\Models\Server
*/
public $server;
public Server $server;
/**
* @var \Pterodactyl\Models\User
*/
public $user;
public User $user;
/**
* Handle a direct call to this notification from the server installed event. This is configured
* in the event service provider.
*
* @param \Pterodactyl\Events\Event|\Pterodactyl\Events\Server\Installed $event
*/
public function handle(Event $event): void
public function handle(Event|Installed $event): void
{
$event->server->loadMissing('user');
@ -45,20 +40,16 @@ class ServerInstalled extends Notification implements ShouldQueue, ReceivesEvent
/**
* Get the notification's delivery channels.
*
* @return array
*/
public function via()
public function via(): array
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail()
public function toMail(): MailMessage
{
return (new MailMessage())
->greeting('Hello ' . $this->user->username . '.')