@param $stringAmount

@throws \Keios\MoneyRight\Exceptions\InvalidArgumentException
341193
private function bootWith($stringAmount)
    {
        $this->assertValidAmountString($stringAmount);
        $this->amount = $this->normalizeAmountFromString($stringAmount);
    }
611651
protected function setAccount($account)
	{
		if (empty($account))
		{
			throw new \InvalidArgumentException("Label can't contain empty strings");
		}

		$this->label .= str_replace('%40', '@', rawurlencode($account));
	}
1211486
public function endingDailyAfterCount($count)
    {
        if (false == is_int($count) || $count <= 0) {
            throw new \InvalidArgumentException('Ending daily after count must be a positive number!');
        }

        if (null == $this->startTimeOfDay) {
            throw new \InvalidArgumentException('You must set the startDailyAt() before calling this endingDailyAfterCount()!');
        }

        $today = new \DateTime();
        $startTimeOfDayDate = $this->getTimeOfDayForDate($today, $this->startTimeOfDay);
        $maxEndTimeOfDayDate = (clone $today)->setTime(23, 59, 59);
        $remainingSecondsInDay = ((int) $maxEndTimeOfDayDate->format('U')) - ((int) $startTimeOfDayDate->format('U'));

        if ($this->intervalUnit == IntervalUnit::SECOND) {
            $intervalInSeconds = $this->interval;
        } elseif ($this->intervalUnit == IntervalUnit::MINUTE) {
            $intervalInSeconds = $this->interval * 60;
        } elseif ($this->intervalUnit == IntervalUnit::HOUR) {
            $intervalInSeconds = $this->interval * 60 * 24;
        } else {
            throw new \InvalidArgumentException(sprintf('The IntervalUnit is invalid for this trigger: "%s"', $this->intervalUnit));
        }

        if ($remainingSecondsInDay - $intervalInSeconds <= 0) {
            throw new \InvalidArgumentException('The startTimeOfDay is too late with given Interval and IntervalUnit values.');
        }

        $maxNumOfCount = ($remainingSecondsInDay / $intervalInSeconds);
        if ($count > $maxNumOfCount) {
            throw new \InvalidArgumentException(sprintf('The given count is too large!: count: "%s", max: "%s"', $count, $maxNumOfCount));
        }

        $incrementInSeconds = ($count - 1) * $intervalInSeconds;
        $endTimeOfDayDate = clone $startTimeOfDayDate;
        $endTimeOfDayDate->add(new \DateInterval(sprintf('PT%dS', $incrementInSeconds)));

        if ($endTimeOfDayDate > $maxEndTimeOfDayDate) {
            throw new \InvalidArgumentException(sprintf('The given count is too large!: count: "%s", max: "%s"', $count, $maxNumOfCount));
        }

        $this->endTimeOfDay = $endTimeOfDayDate;

        return $this;
    }
1164632
private function _authorizePaymentAmount ($authorizationAmount, $authorizationReferenceId)
    {
        $response = $this->callStepAndCheckForException('authorizePaymentAmount', 
                array(
                    $authorizationAmount,
                    $authorizationReferenceId
                ));
        printAuthorizeOnBillingAgreementResponse($response);
        return $response->getAuthorizeOnBillingAgreementResult()
            ->getAuthorizationDetails()
            ->getAmazonAuthorizationId();
    }
1168892
public function setAlt($alt)
    {
        if (is_string($alt)) {
            $this->alt = $alt;
        } else {
            $msg = "The 'alt' argument must be a string, '" . gettype($alt) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
483745
public function setFromString($coordinates)
    {
        if (!is_string($coordinates)) {
            throw new InvalidArgumentException('The given coordinates should be a string !');
        }

        try {
            $inDecimalDegree = $this->toDecimalDegrees($coordinates);
            $this->setLatitude($inDecimalDegree[0]);
            $this->setLongitude($inDecimalDegree[1]);
        } catch (InvalidArgumentException $e) {
            throw $e;
        }
    }
1026010
public function setNumber($number)
    {
      if(!is_string($number) || strlen(trim($number)) == 0)
        throw new InvalidArgumentException(__METHOD__ . '; Invalid number, must be a non empty string');

      $this->number = $number;
    }
579139
public function setMethod($method)
    {
      if(!is_string($method) && strlen(trim($method)) == 0)
        throw new InvalidArgumentException(__METHOD__ . '; Invalid method, must be a non empty string');

      $this->method = $method;
    }
1319486
public function setStringValue($stringValue)
    {
        if (\is_array($stringValue) || \is_object($stringValue)) {
            $m = "Invalid value type for attribute {$this->getFamilyCode()}.{$this->getAttributeCode()}, ";
            $m .= 'expecting string, got '.gettype($stringValue);
            throw new \UnexpectedValueException($m);
        }
        if (null !== $stringValue && 255 < \mb_strlen($stringValue)) {
            $stringValue = mb_substr($stringValue, 0, 255);
        }
        $this->stringValue = null === $stringValue ? null : (string) $stringValue;

        return $this;
    }
178283
public function setName(string $name): void
	{
		if ($name === '') {
			throw new InvalidArgumentException;
		}
		if (Strings::match($name, '/[^A-Za-z0-9_]/')) {
			throw new InvalidArgumentException('Name contains invalid characters');
		}

		/* @var $repository AclRolesRepository */
		$repository = $this->getRepository();
		$role = $repository->getByName($name);
		if ($role !== null && $role !== $this) {
			throw new UniqueConstraintViolationException("Role '$name' exists");
		}
		$this->name = $name;
	}
105303
public function endsWith(self $str, MStringComparison $cmp = null){
		
		if($str->isNullOrEmpty()){
			throw new \InvalidArgumentException('$str is empty');
		}
		
		if($str->count() > $this->count()){
			throw new \InvalidArgumentException('$str is longer than $this');
		}
		
		if($cmp === null || $cmp->Value === MStringComparison::CASE_SENSITIVE){
			return $this
					->substring($this->count() - $str->count(), $str->count())
					->_Value === $str->_Value;
		}
		else{
			return $this
					->substring($this->count() - $str->count(), $str->count())
					->toLower()->_Value === $str->toLower()->_Value;
		}
		
	}
1194527
public function increment($byAmount = 1) {
		if ($this->name === null) {
			throw new InvalidConfigException(get_class($this)." requires a name!");
		}
		return $this->_value = (int) $this->getConnection()->getClient()->incrBy($this->name,$byAmount);
	}
341129
public function validate($str)
    {
        if ($str === null) {
            throw new \InvalidArgumentException('Error: String must not be null');
        }
        if (! is_string($str)) {
            throw new \InvalidArgumentException(
                'Error: String must be of type string but is of type "'.gettype($str).'"'
            );
        }
        if ($str === '') {
            throw new \InvalidArgumentException('Error: String must not be empty');
        }
        if ($this->containsMultibyteChar($str)) {
            throw new \InvalidArgumentException('Error: String must not contain any multibyte characters');
        }
    }
270507
public function setUnion(EnumSet $other): void
    {
        if ($this->enumeration !== $other->enumeration) {
            throw new InvalidArgumentException(\sprintf(
                'Other should be of the same enumeration as this %s',
                $this->enumeration
            ));
        }

        $this->bitset = $this->bitset | $other->bitset;
    }
300215
public function setAmount($value)
    {
        if ($value === null) {
            $this->_amount = null;
        } elseif ($value instanceof AmountInterface) {
            $this->_amount = $value;
        } elseif (is_array($value)) {
            $this->_amount = new MonetaryAmount();
            $this->_amount->fromArray($value);
        } else {
            throw new InvalidPropertyValueTypeException(
                'Invalid B2bSberbankVatData.amount value type', 0, 'B2bSberbankVatData.amount', $value
            );
        }
    }
752093
public function setMarkup($markup)
    {
        if (!is_string($markup)) {
            throw new Exception\InvalidArgumentException(
                'Expected string. Got "' . gettype($markup) . '".'
            );
        }

        $this->DOMDocument = new DOMDocument;

        $this->DOMDocument->loadHTML($markup);
    }
109581
public function byAmount( $nAmount ) {
		$oTheOne = null;
		foreach ( $this as $oBankTxn ) {
			if ( (string)$oBankTxn->amount == (string)$nAmount ) {
				$oTheOne = $oBankTxn;
				break;
			}
		}
		return $oTheOne;
	}