function ObjectHasProperty::matches
Evaluates the constraint for parameter $other. Returns true if the constraint is met, false otherwise.
Parameters
mixed $other value or object to evaluate:
Overrides Constraint::matches
File
-
vendor/
phpunit/ phpunit/ src/ Framework/ Constraint/ Object/ ObjectHasProperty.php, line 46
Class
- ObjectHasProperty
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\Framework\ConstraintCode
protected function matches(mixed $other) : bool {
if (!is_object($other)) {
return false;
}
return (new ReflectionObject($other))->hasProperty($this->propertyName);
}