function Assert::isIterable
@psalm-pure @psalm-assert iterable $value
Parameters
mixed $value:
string $message:
Throws
1 call to Assert::isIterable()
- Assert::__callStatic in vendor/
webmozart/ assert/ src/ Assert.php
File
-
vendor/
webmozart/ assert/ src/ Assert.php, line 389
Class
- Assert
- Efficient assertions to validate the input/output of your methods.
Namespace
Webmozart\AssertCode
public static function isIterable($value, $message = '') {
if (!\is_array($value) && !$value instanceof Traversable) {
static::reportInvalidArgument(\sprintf($message ?: 'Expected an iterable. Got: %s', static::typeToString($value)));
}
}