Move notification event type onto events
linter / quality (pull_request) Successful in 1m28s
tests / ci (8.4) (pull_request) Successful in 1m46s

This commit is contained in:
2026-04-29 09:35:31 +00:00
parent 4832e7f984
commit ff5e54cad7
10 changed files with 26 additions and 29 deletions
@@ -7,8 +7,6 @@ use Carbon\CarbonImmutable;
final readonly class TicketCreatedPayload implements NotificationEventPayload
{
public NotificationEventType $eventType;
public ?int $fromStatusId;
public ?string $fromStatusLabel;
@@ -27,16 +25,10 @@ final readonly class TicketCreatedPayload implements NotificationEventPayload
public string $toStatusLabel,
public CarbonImmutable $occurredAt,
) {
$this->eventType = NotificationEventType::TicketCreate;
$this->fromStatusId = null;
$this->fromStatusLabel = null;
}
public function eventType(): NotificationEventType
{
return $this->eventType;
}
public function projectId(): int
{
return $this->projectId;
@@ -84,7 +76,7 @@ final readonly class TicketCreatedPayload implements NotificationEventPayload
public function toArray(): array
{
return [
'event_type' => $this->eventType->value,
'event_type' => NotificationEventType::TicketCreate->value,
'project' => [
'id' => $this->projectId,
'key' => $this->projectKey,