function Assert::count
Does not check if $array is countable, this can generate a warning on php versions after 7.2.
Parameters
Countable|array $array:
int $number:
string $message:
Throws
File
-
vendor/
webmozart/ assert/ src/ Assert.php, line 1737
Class
- Assert
- Efficient assertions to validate the input/output of your methods.
Namespace
Webmozart\AssertCode
public static function count($array, $number, $message = '') {
static::eq(\count($array), $number, \sprintf($message ?: 'Expected an array to contain %d elements. Got: %d.', $number, \count($array)));
}