function Assert::propertyExists
@psalm-pure @psalm-param class-string|object $classOrObject
Parameters
string|object $classOrObject:
mixed $property:
string $message:
Throws
File
-
vendor/
webmozart/ assert/ src/ Assert.php, line 1599
Class
- Assert
- Efficient assertions to validate the input/output of your methods.
Namespace
Webmozart\AssertCode
public static function propertyExists($classOrObject, $property, $message = '') {
if (!\property_exists($classOrObject, $property)) {
static::reportInvalidArgument(\sprintf($message ?: 'Expected the property %s to exist.', static::valueToString($property)));
}
}