本文整理汇总了PHP中Assert\Assertion::lessThan方法的典型用法代码示例。如果您正苦于以下问题:PHP Assertion::lessThan方法的具体用法?PHP Assertion::lessThan怎么用?PHP Assertion::lessThan使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Assert\Assertion
的用法示例。
在下文中一共展示了Assertion::lessThan方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkJWS
/**
* {@inheritdoc}
*/
public function checkJWS(Object\JWSInterface $jws, $signature)
{
Assertion::integer($signature);
Assertion::lessThan($signature, $jws->countSignatures());
$checked_claims = $this->checkJWT($jws);
$protected_headers = $jws->getSignature($signature)->getProtectedHeaders();
$headers = $jws->getSignature($signature)->getHeaders();
$this->checkHeaders($protected_headers, $headers, $checked_claims);
}
示例2: testLessThanThrowsException
/**
* @dataProvider invalidLessProvider
*/
public function testLessThanThrowsException($value, $limit)
{
$this->setExpectedException('Assert\\AssertionFailedException', null, Assertion::INVALID_LESS);
Assertion::lessThan($value, $limit);
}
示例3: setRefreshTokenMinLength
/**
* @param int $refresh_token_min_length
*/
public function setRefreshTokenMinLength($refresh_token_min_length)
{
Assertion::integer($refresh_token_min_length);
Assertion::greaterThan($refresh_token_min_length, 0);
Assertion::lessThan($refresh_token_min_length, $this->getRefreshTokenMaxLength());
$this->refresh_token_min_length = $refresh_token_min_length;
}
示例4: setAccessTokenMinLength
/**
* @param int $access_token_min_length
*/
public function setAccessTokenMinLength($access_token_min_length)
{
Assertion::integer($access_token_min_length);
Assertion::greaterThan($access_token_min_length, 0);
Assertion::lessThan($access_token_min_length, $this->getAccessTokenMaxLength());
$this->access_token_min_length = $access_token_min_length;
}
示例5: price
/**
* Validate price:
* 0 < $price < 10000
* @param $price
*/
public static function price($price)
{
Assert::digit($price);
Assert::greaterThan($price, 0);
Assert::lessThan($price, 10000);
}
示例6: withDuration
/**
* @param int $duration
*
* @throws \InvalidArgumentException
*
* @return static
*/
public function withDuration($duration)
{
Assertion::integer($duration);
Assertion::greaterThan($duration, VideoInterface::DURATION_LOWER_LIMIT);
Assertion::lessThan($duration, VideoInterface::DURATION_UPPER_LIMIT);
$instance = clone $this;
$instance->duration = $duration;
return $instance;
}
示例7: setAuthorizationCodeMinLength
/**
* @param int $authorization_code_min_length
*/
public function setAuthorizationCodeMinLength($authorization_code_min_length)
{
Assertion::integer($authorization_code_min_length);
Assertion::greaterThan($authorization_code_min_length, 0);
Assertion::lessThan($authorization_code_min_length, $this->getAuthorizationCodeMaxLength());
$this->authorization_code_min_length = $authorization_code_min_length;
}