Count
class Count extends Comparator (View source)
Check if the count of the input matches the min and max values.
If min and max are equal, the count must match that value regardless of the inclusive flag.
Methods
__construct(int $min = null, int $max = null, bool $inclusive = true)
No description
static Count
between(int $min, int $max, bool $inclusive = true)
Count must be between the given sizes.
bool
check(mixed $value)
Compare the input value against the comparator.
Details
__construct(int $min = null, int $max = null, bool $inclusive = true)
No description
final bool
__invoke(mixed $value)
Compare the input value against the comparator.
static Count
between(int $min, int $max, bool $inclusive = true)
Count must be between the given sizes.
bool
check(mixed $value)
Compare the input value against the comparator.
static Count
equal(int $size)
Count must be equal to the given size.
static Count
make(int $min = null, int $max = null, bool $inclusive = true)
No description
static Count
max(int $max, bool $inclusive = true)
Count must be less than or equal to the given size.
static Count
min(int $min, bool $inclusive = true)
Count must be greater than or equal to the given size.