Webmozart\Assert\Assert::greaterThanEq PHP Метод

greaterThanEq() публичный статический Метод

public static greaterThanEq ( $value, $limit, $message = '' )
    public static function greaterThanEq($value, $limit, $message = '')
    {
        if ($value < $limit) {
            static::reportInvalidArgument(sprintf($message ?: 'Expected a value greater than or equal to %2$s. Got: %s', static::valueToString($value), static::valueToString($limit)));
        }
    }

Usage Example

Пример #1
0
 /**
  * Create the tag
  *
  * @param string             $body               Tag body
  * @param DescriptionFactory $descriptionFactory The description factory
  * @param Context|null       $context            The Context is used to resolve Types and FQSENs, although optional
  *                                               it is highly recommended to pass it. If you omit it then it is assumed that
  *                                               the DocBlock is in the global namespace and has no `use` statements.
  *
  * @return SleepTime
  */
 public static function create($body, DescriptionFactory $descriptionFactory = null, Context $context = null)
 {
     Assert::integerish($body, self::MSG);
     Assert::greaterThanEq($body, 0, self::MSG);
     Assert::notNull($descriptionFactory);
     return new static($descriptionFactory->create($body, $context));
 }
All Usage Examples Of Webmozart\Assert\Assert::greaterThanEq