function Assert::isCountable
@psalm-pure @psalm-assert countable $value
Parameters
mixed $value:
string $message:
Throws
File
-
vendor/
webmozart/ assert/ src/ Assert.php, line 365
Class
- Assert
- Efficient assertions to validate the input/output of your methods.
Namespace
Webmozart\AssertCode
public static function isCountable($value, $message = '') {
if (!\is_array($value) && !$value instanceof Countable && !$value instanceof ResourceBundle && !$value instanceof SimpleXMLElement) {
static::reportInvalidArgument(\sprintf($message ?: 'Expected a countable. Got: %s', static::typeToString($value)));
}
}