Assert\Assertion::betweenExclusive PHP Method

betweenExclusive() public static method

Assert that a value is greater than a lower limit, and less than an upper limit.
public static betweenExclusive ( mixed $value, mixed $lowerLimit, mixed $upperLimit, string $message = null, string $propertyPath = null ) : boolean
$value mixed
$lowerLimit mixed
$upperLimit mixed
$message string
$propertyPath string
return boolean
    public static function betweenExclusive($value, $lowerLimit, $upperLimit, $message = null, $propertyPath = null)
    {
        if ($lowerLimit >= $value || $value >= $upperLimit) {
            $message = sprintf($message ?: 'Provided "%s" is neither greater than "%s" nor less than "%s".', static::stringify($value), static::stringify($lowerLimit), static::stringify($upperLimit));
            throw static::createException($value, $message, static::INVALID_BETWEEN_EXCLUSIVE, $propertyPath);
        }
        return true;
    }