Skip to content

Commit

Permalink
Merge 760ce5d into 10827bb
Browse files Browse the repository at this point in the history
  • Loading branch information
alexndlm committed Nov 24, 2021
2 parents 10827bb + 760ce5d commit 7b4c62b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -42,7 +42,7 @@ public function __construct(iterable $restrictionsMetadata = [])
*/
public function create(Constraint $constraint, ApiProperty $propertyMetadata): array
{
$oneOfConstraints = $constraint->getNestedContraints();
$oneOfConstraints = method_exists($constraint, 'getNestedContraints') ? $constraint->getNestedContraints() : $constraint->getNestedConstraints();
$oneOfRestrictions = [];

foreach ($oneOfConstraints as $oneOfConstraint) {
Expand Down
Expand Up @@ -183,7 +183,7 @@ private function getPropertyConstraints(

foreach ($validatorPropertyMetadata->findConstraints($validationGroup) as $propertyConstraint) {
if ($propertyConstraint instanceof Sequentially || $propertyConstraint instanceof Compound) {
$constraints[] = $propertyConstraint->getNestedContraints();
$constraints[] = method_exists($propertyConstraint, 'getNestedContraints') ? $propertyConstraint->getNestedContraints() : $propertyConstraint->getNestedConstraints();
} else {
$constraints[] = [$propertyConstraint];
}
Expand Down

0 comments on commit 7b4c62b

Please sign in to comment.