public static function fromNotification(Notification
$notification): self
{ $options =
new self();
$options->
title($notification->
getSubject());
$priority =
match ($notification->
getImportance()) { Notification::IMPORTANCE_URGENT => 2,
Notification::IMPORTANCE_HIGH => 1,
Notification::IMPORTANCE_MEDIUM => 0,
Notification::IMPORTANCE_LOW => -1
};
$options->
priority($priority);
return $options;
} public function toArray(): array
{ $options =
$this->options;
unset($options['attachment'
]);
return $options;
}