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 TicketStatusChangedPayload implements NotificationEventPayload
{
public NotificationEventType $eventType;
public function __construct(
public int $projectId,
public string $projectKey,
@@ -24,14 +22,7 @@ final readonly class TicketStatusChangedPayload implements NotificationEventPayl
public int $toStatusId,
public string $toStatusLabel,
public CarbonImmutable $occurredAt,
) {
$this->eventType = NotificationEventType::TicketStatusChanged;
}
public function eventType(): NotificationEventType
{
return $this->eventType;
}
) {}
public function projectId(): int
{
@@ -80,7 +71,7 @@ final readonly class TicketStatusChangedPayload implements NotificationEventPayl
public function toArray(): array
{
return [
'event_type' => $this->eventType->value,
'event_type' => NotificationEventType::TicketStatusChanged->value,
'project' => [
'id' => $this->projectId,
'key' => $this->projectKey,