diff --git a/src/Messages/Channel/WhatsApp/WhatsAppFile.php b/src/Messages/Channel/WhatsApp/WhatsAppFile.php index 2fdacf12..7f9274c1 100644 --- a/src/Messages/Channel/WhatsApp/WhatsAppFile.php +++ b/src/Messages/Channel/WhatsApp/WhatsAppFile.php @@ -26,11 +26,8 @@ public function toArray(): array { $returnArray = $this->getBaseMessageUniversalOutputArray(); $returnArray['file'] = $this->fileObject->toArray(); - - if (!is_null($this->context)) { - $returnArray['context'] = $this->context; - } + $returnArray['context'] = $this->context ?? null; return $returnArray; } -} \ No newline at end of file +}