private function setAddress(AddressInterface $address, AddressInterface $lastOrderAddress) { if ($address->getFirstName() === null) { $address->setFirstName($lastOrderAddress->getFirstName()); } if ($address->getLastName() === null) { $address->setLastName($lastOrderAddress->getLastName()); } if ($address->getPhoneNumber() === null) { $address->setPhoneNumber($lastOrderAddress->getPhoneNumber()); } if ($address->getCountryCode() === null) { $address->setCountryCode($lastOrderAddress->getCountryCode()); } if ($address->getProvinceCode() === null) { $address->setProvinceCode($lastOrderAddress->getProvinceCode()); } if ($address->getStreet() === null) { $address->setStreet($lastOrderAddress->getStreet()); } if ($address->getCity() === null) { $address->setCity($lastOrderAddress->getCity()); } if ($address->getPostcode() === null) { $address->setPostcode($lastOrderAddress->getPostcode()); } }