function Mixin::allNullOrThrows
@psalm-param class-string<Throwable> $class
Parameters
iterable<Closure|null> $expression:
string $class:
string $message:
Return value
void
Throws
File
-
vendor/
webmozart/ assert/ src/ Mixin.php, line 5081
Class
- Mixin
- This trait provides nurllOr*, all* and allNullOr* variants of assertion base methods. Do not use this trait directly: it will change, and is not designed for reuse.
Namespace
Webmozart\AssertCode
public static function allNullOrThrows($expression, $class = 'Exception', $message = '') {
static::isIterable($expression);
foreach ($expression as $entry) {
null === $entry || static::throws($entry, $class, $message);
}
}