public static function getOptions($data, $key, $value) {
    $options = [];
    if (empty($data) && !is_array($data)) {
      return [];
    }

    foreach ($data as $item) {
      $options[$item->$key] = $item->$value;
    }

    return $options;
  }