invoice = $invoice; $this->deleteExistingFile = $deleteExistingFile; } /** * Hands the work to the document itself and always reports success — the * return value is a leftover of the queue contract; nothing reads it. */ public function handle(): int { $document = $this->invoice; $document->generatePDF('invoice', $document->invoice_number, $this->deleteExistingFile); return 0; } }