code: public function restore(array $data, array $fields)
      {
          foreach ($fields as $field => $type) {
              if (!isset($data[$field])) {
                  continue;
              }
  
              $property = AccessorUtil::property($field);
              $value = $data[$field];
  
              $value = $this->getPropertyValueForRestore($type, $value, $field);
  
              $this->{$property} = $value;
          }
      }
docs: @param array $data
  @param array $fields
  
  @return void
  @throws \UnexpectedValueException