/**
  * Load and populate reward options and add them to the Config
  *
  * @param Config $config
  *
  * @param array $formData
  */
 private function _addRewardOptions(Config $config, array $formData)
 {
     if (empty($formData['reward_options'])) {
         return;
     }
     $rewardOptionsData = $formData['reward_options'];
     if (!is_array($rewardOptionsData)) {
         $type = gettype($rewardOptionsData) === 'object' ? get_class($rewardOptionsData) : gettype($rewardOptionsData);
         throw new \LogicException('Reward option form data must be an array, ' . $type . ' given');
     }
     foreach ($rewardOptionsData as $name => $value) {
         if (null === $value) {
             continue;
         }
         $rewardOption = clone $this->_rewardOptions->get($name);
         $rewardOption->setValue($value);
         $config->addRewardOption($rewardOption);
     }
 }