Increments the major version number and resets the minor and patch
version numbers to zero.

@param integer $amount Increment by what amount?

@return Builder The Version builder.
331278
public function incrementMajor($amount = 1)
    {
        $this->major += $amount;
        $this->minor = 0;
        $this->patch = 0;

        return $this;
    }
1280423
public function setAmount($amount)
    {
        if ($amount instanceof DBMoney) {
            $this->setField('Money', $amount);
        } elseif ($this->Status == 'Created' && is_numeric($amount)) {
            $this->MoneyAmount = $amount;
        }
        return $this;
    }
1052830
protected function setVersion($version) {
		$this->version = $version;

		$numbers = explode('.', $version);

		// Update Mayor and Minor-Version-Numbers
		$this->setMayor((int) $numbers[0]);
		$this->setMinor((int) $numbers[1]);
	}
219566
public function getAmount($amount)
    {
        if (!is_float($amount) &&
            $this->getCurrencyDecimalPlaces() > 0 &&
            false === strpos((string) $amount, '.')) {
            throw new InvalidArgumentException(
                'Please specify amount as a string or float, '.
                'with decimal places (e.g. \'10.00\' to represent $10.00).'
            );
        }

        return $this->formatCurrency($amount);
    }
1276450
public function reverse($amount = null)
    {
        $builder = new HpsCreditServiceReverseBuilder($this);
        return $builder
            ->withAmount($amount)
            ->withCurrency('usd');
    }
950922
private function _checkAmount(&$amount)
    {
        if (!isset($amount)) {
            throw new Klarna_ArgumentNotSetException("Amount");
        }
        if (is_numeric($amount)) {
            $this->_fixValue($amount);
        }
        if (is_numeric($amount) && !is_int($amount)) {
            $amount = intval($amount);
        }
        if (!is_numeric($amount) || !is_int($amount)) {
            throw new Klarna_InvalidTypeException("amount", "integer");
        }
    }
864959
public function major() : Version
    {
        if ('' !== $this->preRelease && 0 === $this->patch && 0 === $this->minor) {
            return new self($this->major, 0, 0);
        }

        return new self($this->major + 1, 0, 0);
    }
47729
function increment(type, version) {
  debug(`incrementing ${version} by ${type}`);

  let [major, minor, patch] = version
    .replace('v', '')
    .split('.')
    .map((v) => parseInt(v, 10));

  if (major === 0) {
    switch (type) {
      case 'major':
        minor += 1;
        patch = 0;
        break;
      case 'minor':
        patch += 1;
        break;
      case 'patch':
        patch += 1;
        break;
      default:
        throw new Error('unrecognized change type');
    }
  }
  else {
    switch (type) {
      case 'major':
        major += 1;
        minor = 0;
        patch = 0;
        break;
      case 'minor':
        minor += 1;
        patch = 0;
        break;
      case 'patch':
        patch += 1;
        break;
      default:
        throw new Error('unrecognized change type');
    }
  }

  return `${major}.${minor}.${patch}`;
}
1298633
public function increment($column, $amount = 1, array $extra = array())
    {
        $extra = $this->addUpdatedAtColumn($extra);

        return $this->query->increment($column, $amount, $extra);
    }
822579
public function reverse($amount = null)
    {
        return (new ManagementBuilder(TransactionType::REVERSAL))
            ->withPaymentMethod($this->transactionReference)
            ->withAmount($amount);
    }
214297
public function capture($amount = null)
    {
        return (new ManagementBuilder(TransactionType::CAPTURE))
            ->withPaymentMethod($this->transactionReference)
            ->withAmount($amount);
    }
1374891
protected function incrementVersion($version, $patch_limit = 20, $minor_limit = 50)
    {
        if (!$this->isVersionNumeric($version)) {
            throw new DeploymentRuntimeException(
                'Unable to increment semantic version.'
            );
        }
        list($major, $minor, $patch) = explode('.', $version);

        if ($patch < $patch_limit) {
            ++$patch;
        } else if ($minor < $minor_limit) {
            ++$minor;
            $patch = 0;
        } else {
            ++$major;
            $patch = 0;
            $minor = 0;
        }

        return "{$major}.{$minor}.{$patch}";
    }
1306274
final public function limit(int $amount = null)
    {
        $this->limitAmount = $amount === null ? null : $amount;

        return $this;
    }
1151945
public function setAmount($amount)
    {
        if ($amount === null) {
            $this->amount = 0;
            return $this;
        }
        
        if (!is_int($amount)) {
            throw new InvalidArgumentException(sprintf(
                'Amount must be an integer, "%s" given',
                is_object($amount) ? get_class($amount) : gettype($amount)
            ));
        }
        
        // Overflow check is not necessary because we have an integer
        $this->amount = $amount;
        return $this;
    }
615739
public function transpose($amount) {
		$func = function($n) use ($amount) {return \ianring\PMTObject::_truemod(($n + $amount), 12);};
		$this->tones = array_map($func, $this->tones);
	}
935621
public function limit(int $amount)
    {
        $this->items = array_slice($this->items, 0, $amount);

        return $this;
    }
1257108
public function setAmount($amount)
    {
      if(!is_int($amount) || $amount < 0)
        throw new InvalidArgumentException(__METHOD__ . '; Invalid amount, must be a positive integer');

      $this->amount = $amount;
    }