subject = $subject; $this->id = $id; $this->references = $references; } public function hasReSubject(): bool { return str_starts_with($this->getSubject(), 'Re:'); } public function getSubject(): string { return $this->subject; } public function getBaseSubject(): string { return str_replace('Re:', '', $this->getSubject()); } public function getId(): string { return $this->id; } /** * @return string[] */ public function getReferences(): array { return $this->references; } #[\Override] #[ReturnTypeWillChange] public function jsonSerialize() { return [ 'subject' => $this->subject, 'id' => $this->id, 'references' => $this->references, ]; } }