/** * @param BuyerInterface $buyer * @param ExtractorResult $extractorResult */ private function copyValue(BuyerInterface $buyer, ExtractorResult $extractorResult) { switch ($extractorResult->getPropertyName()) { case TransformerProperties::BUYER_EMAIL: $buyer->setEmail($extractorResult->getValue()); break; case TransformerProperties::BUYER_PHONE: $buyer->setPhone($extractorResult->getValue()); break; case TransformerProperties::BUYER_FIRST_NAME: $buyer->setFirstName($extractorResult->getValue()); break; case TransformerProperties::BUYER_LAST_NAME: $buyer->setLastName($extractorResult->getValue()); break; default: } }