Skip to content

Commit

Permalink
avoid invalid minOccurs inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
Guite committed Jan 16, 2024
1 parent c6ceb39 commit 9b67a66
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/SchemaReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ private function loadSequenceChildNodeLoadElement(
$this->resolveSubstitutionGroup($schema, $node, $childNode, $element);

if (null !== $min) {
$element->setMin(max($element->getMin(), $min));
$element->setMin($min);
}

if (null !== $max && 1 < $max) {
Expand Down
2 changes: 0 additions & 2 deletions tests/TypesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,6 @@ public function testSequenceMinOccursOverride($sequenceMinOccurs, $childMinOccur
public function getMinOccurencesOverride(): array
{
return [
['0', '5', 5],
['0', '1', 1],
['1', '1', 1],
['2', '1', 2],
['3', '0', 3],
Expand Down

0 comments on commit 9b67a66

Please sign in to comment.