Ejemplo n.º 1
0
 /**
  * @param Generic\AllOfConstraint $constraint
  *
  * @return Result\ValidationResult
  */
 public function visitAllOfConstraint(Generic\AllOfConstraint $constraint)
 {
     if (1 === count($constraint->schemas())) {
         $schemas = $constraint->schemas();
         return $schemas[0]->accept($this);
     }
     $result = $this->createResult();
     foreach ($constraint->schemas() as $schema) {
         $result = $result->merge($schema->accept($this));
     }
     return $result;
 }
 /**
  * @param Generic\AllOfConstraint $constraint
  *
  * @return Generic\AllOfConstraint
  */
 public function visitAllOfConstraint(Generic\AllOfConstraint $constraint)
 {
     return new Generic\AllOfConstraint($this->transformConstraintArray($constraint->schemas()));
 }