/** * @param InvoiceInterface $invoice * @param string $propertyName * @param string $value * @return InvoiceTransformer */ private function copyRecipientValue(InvoiceInterface $invoice, $propertyName, $value) { switch ($propertyName) { case TransformerProperties::INVOICE_RECIPIENT_EMAIL: $invoice->setRecipientEmail($value); break; case TransformerProperties::INVOICE_RECIPIENT_NAME: $invoice->setRecipientName($value); break; case TransformerProperties::INVOICE_RECIPIENT_PHONE: $invoice->setRecipientPhone($value); break; case TransformerProperties::INVOICE_RECIPIENT_TIN: $invoice->setRecipientTin($value); break; } return $this; }