function UndefinedConstraint::check
Overrides ConstraintInterface::check
File
-
vendor/
justinrainbow/ json-schema/ src/ JsonSchema/ Constraints/ UndefinedConstraint.php, line 34
Class
- UndefinedConstraint
- The UndefinedConstraint Constraints
Namespace
JsonSchema\ConstraintsCode
public function check(&$value, $schema = null, ?JsonPointer $path = null, $i = null, $fromDefault = false) {
if (is_null($schema) || !is_object($schema)) {
return;
}
$path = $this->incrementPath($path ?: new JsonPointer(''), $i);
if ($fromDefault) {
$path->setFromDefault();
}
// check special properties
$this->validateCommonProperties($value, $schema, $path, $i);
// check allOf, anyOf, and oneOf properties
$this->validateOfProperties($value, $schema, $path, '');
// check known types
$this->validateTypes($value, $schema, $path, $i);
}