document_type = $document_type; $this->files = $files; $this->reference = $reference; $this->status = $status; $this->path = $path; } /** * @return string */ public function getDocumentType(): string { return $this->document_type; } /** * @return string */ public function getReference(): string { return $this->reference; } /** * @return int */ public function getStatus(): int { return $this->status; } /** * @return array * @throws \App\Classes\Exceptions\MalformedRequestException */ public function getFiles(): array { $filePath = $this->path; $filesystemDriver = Storage::getDefaultDriver(); if($filesystemDriver == 's3'){ $filePath = 'documents/'.$this->path; } return (new ConvertsBase64ToFile($filePath))->convert($this->files); } }