function Mixin::allNullOrPropertyExists
@psalm-pure @psalm-param iterable<class-string|object|null> $classOrObject
Parameters
iterable<string|object|null> $classOrObject:
mixed $property:
string $message:
Return value
void
Throws
File
-
vendor/
webmozart/ assert/ src/ Mixin.php, line 4189
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 allNullOrPropertyExists($classOrObject, $property, $message = '') {
static::isIterable($classOrObject);
foreach ($classOrObject as $entry) {
null === $entry || static::propertyExists($entry, $property, $message);
}
}