<commit_before>/* global google */

export default class Icons {

  getIconByType(type) {
    switch (type) {
    case 'user':
      return this.getUserIcon();
    case 'supermarket':
      return this.getSupermarketIcon();
    case 'culture':
      return this.getCultureIcon();
    default:
      return this.getDefaultIcon();
    }
  }

  getUserIcon() {
    let icon = this.create({
      url: '../assets/marker-stroked-24@2x.png',
      width: 40,
      height: 40,
      anchorX: 20,
      anchorY: 40
    });
    return icon;
  }

  getSupermarketIcon() {
    let icon = this.create({
      url: '../assets/grocery-24@2x.png',
      width: 30,
      height: 30,
      anchorX: 15,
      anchorY: 15
    });
    return icon;
  }

  getCultureIcon() {
    let icon = this.create({
      url: '../assets/town-hall-24@2x.png',
      width: 30,
      height: 30,
      anchorX: 15,
      anchorY: 15
    });
    return icon;
  }

  getDefaultIcon() {
    let icon = this.create({
      url: '../assets/marker-24@2x.png',
      width: 30,
      height: 30,
      anchorX: 15,
      anchorY: 15
    });
    return icon;
  }

  create({url, width, height, anchorX, anchorY}) {
    let image = {
      url: url,
      size: new google.maps.Size(width, height),
      origin: new google.maps.Point(0, 0),
      anchor: new google.maps.Point(anchorX, anchorY),
      scaledSize: new google.maps.Size(width, height)
    };
    return image;
  }
}
<commit_msg>docs(icons): add missing jsdocs<commit_after>/* global google */

export default class Icons {

  /**
   * Get the marker icon
   * @param {String} type The type of the location
   * @return {GoogleIconObject} icon The marker icon
   */
  getIconByType(type) {
    switch (type) {
    case 'user':
      return this.getUserIcon();
    case 'supermarket':
      return this.getSupermarketIcon();
    case 'culture':
      return this.getCultureIcon();
    default:
      return this.getDefaultIcon();
    }
  }

  /**
   * Get the user icon
   * @return {GoogleIconObject} icon The marker icon
   */
  getUserIcon() {
    let icon = this.create({
      url: '../assets/marker-stroked-24@2x.png',
      width: 40,
      height: 40,
      anchorX: 20,
      anchorY: 40
    });
    return icon;
  }

  /**
   * Get the supermarket icon
   * @return {GoogleIconObject} icon The marker icon
   */
  getSupermarketIcon() {
    let icon = this.create({
      url: '../assets/grocery-24@2x.png',
      width: 30,
      height: 30,
      anchorX: 15,
      anchorY: 15
    });
    return icon;
  }

  /**
   * Get the culture icon
   * @return {GoogleIconObject} icon The marker icon
   */
  getCultureIcon() {
    let icon = this.create({
      url: '../assets/town-hall-24@2x.png',
      width: 30,
      height: 30,
      anchorX: 15,
      anchorY: 15
    });
    return icon;
  }

  /**
   * Get the default icon
   * @return {GoogleIconObject} icon The marker icon
   */
  getDefaultIcon() {
    let icon = this.create({
      url: '../assets/marker-24@2x.png',
      width: 30,
      height: 30,
      anchorX: 15,
      anchorY: 15
    });
    return icon;
  }

  /**
   * Create the google icon object
   * @param {String} url The icon URL
   * @param {Integer} width The icon width
   * @param {Integer} height The icon height
   * @param {Integer} anchorX The x anchor value
   * @param {Integer} anchorY The y anchor value
   * @return {GoogleIconObject} icon The marker icon
   */
  create({url, width, height, anchorX, anchorY}) {
    let image = {
      url: url,
      size: new google.maps.Size(width, height),
      origin: new google.maps.Point(0, 0),
      anchor: new google.maps.Point(anchorX, anchorY),
      scaledSize: new google.maps.Size(width, height)
    };
    return image;
  }
}

{'fraction_non_alphanumeric': 0.13445154419595315, 'fraction_numerical': 0.024494142705005325, 'mean_word_length': 2.170464135021097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 8, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2806995', 'n_tokens_mistral': 1318, 'n_tokens_neox': 1226, 'n_words': 336}