Skip to content

Commit

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

if (null !== $min) {
// NOTE must not pass "null" to max() function, because "max(null, 0)" returns "null" instead of "0"
$element->setMin(max((int) $element->getMin(), $min));
$element->setMin(max($element->getMin(), $min));
}

if (null !== $max && 1 < $max) {
Expand Down

0 comments on commit a2d3b25

Please sign in to comment.