App\services\PushService::messageType PHP Method

messageType() private method

method which formats an appropriate message depending on message type
private messageType ( Invoice $invoice, $type ) : string
$invoice app\models\Invoice
$type
return string
    private function messageType(Invoice $invoice, $type)
    {
        switch ($type) {
            case 'sent':
                return $this->entitySentMessage($invoice);
                break;
            case 'paid':
                return $this->invoicePaidMessage($invoice);
                break;
            case 'approved':
                return $this->quoteApprovedMessage($invoice);
                break;
            case 'viewed':
                return $this->entityViewedMessage($invoice);
                break;
        }
    }