public function onInvoiceGenerated(OrderEvent $event) { $emailAddress = $this->getEmailAddress($event); $this->communicationService->sendInvoice($emailAddress, $event->getOrder()->getId()); }