<commit_before><?php

/*
 * This file is part of the PhpTabs package.
 *
 * Copyright (c) landrok at github.com/landrok
 *
 * For the full copyright and license information, please see
 * <https://github.com/stdtabs/phptabs/blob/master/LICENSE>.
 */

namespace PhpTabs\Music;

/**
 * @uses BendPoint
 */
class EffectBend
{
  const SEMITONE_LENGTH     = 1;
  const MAX_POSITION_LENGTH = 12;
  const MAX_VALUE_LENGTH    = 12;

  private $points = [];

  /**
   * @param int $position
   * @param int $value
   */
  public function addPoint($position, $value)
  {
    $this->points[] = new BendPoint($position, $value);
  }

  /**
   * @return array
   */
  public function getPoints()
  {
    return $this->points;
  }

  /**
   * @return int
   */
  public function countPoints()
  {
    return count($this->points);
  }

  /**
   * @return \PhpTabs\Music\EffectBend
   */
  public function __clone()
  {
    $effect = new EffectBend();

    foreach ($this->getPoints() as $point) {
      $effect->addPoint($point->getPosition(), $point->getValue());
    }

    return $effect;
  }
}


/**
 * @uses EffectBend
 */
class BendPoint extends EffectPointsBase
{
  /**
   * @param int $duration
   * 
   * @return int
   */
  public function getTime($duration)
  {
    return ($duration * $this->getPosition() / EffectBend::MAX_POSITION_LENGTH);
  }

  /**
   * @return \PhpTabs\Model\BendPoint
   */
  public function __clone()
  {
    return new BendPoint($this->getPosition(), $this->getValue());
  }
}<commit_msg>Fix PHPDoc wrong type annotation<commit_after><?php

/*
 * This file is part of the PhpTabs package.
 *
 * Copyright (c) landrok at github.com/landrok
 *
 * For the full copyright and license information, please see
 * <https://github.com/stdtabs/phptabs/blob/master/LICENSE>.
 */

namespace PhpTabs\Music;

/**
 * @uses BendPoint
 */
class EffectBend
{
  const SEMITONE_LENGTH     = 1;
  const MAX_POSITION_LENGTH = 12;
  const MAX_VALUE_LENGTH    = 12;

  private $points = [];

  /**
   * @param int $position
   * @param int $value
   */
  public function addPoint($position, $value)
  {
    $this->points[] = new BendPoint($position, $value);
  }

  /**
   * @return array
   */
  public function getPoints()
  {
    return $this->points;
  }

  /**
   * @return int
   */
  public function countPoints()
  {
    return count($this->points);
  }

  /**
   * @return \PhpTabs\Music\EffectBend
   */
  public function __clone()
  {
    $effect = new EffectBend();

    foreach ($this->getPoints() as $point) {
      $effect->addPoint($point->getPosition(), $point->getValue());
    }

    return $effect;
  }
}


/**
 * @uses EffectBend
 */
class BendPoint extends EffectPointsBase
{
  /**
   * @param int $duration
   * 
   * @return int
   */
  public function getTime($duration)
  {
    return ($duration * $this->getPosition() / EffectBend::MAX_POSITION_LENGTH);
  }

  /**
   * @return \PhpTabs\Music\BendPoint
   */
  public function __clone()
  {
    return new BendPoint($this->getPosition(), $this->getValue());
  }
}
{'fraction_non_alphanumeric': 0.15202369200394866, 'fraction_numerical': 0.003290556103981573, 'mean_word_length': 2.8143036386449185, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 25, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '1342886', 'n_tokens_mistral': 1052, 'n_tokens_neox': 1017, 'n_words': 228}