Code Duplication    Length = 13-14 lines in 3 locations

src/AbstractSchemaReader.php 1 location

@@ 691-703 (lines=13) @@
688
        Closure $againstNodeList
689
    ) {
690
        $limit = $node->childNodes->length;
691
        for ($i = 0; $i < $limit; $i += 1) {
692
            /**
693
            * @var DOMNode $childNode
694
            */
695
            $childNode = $node->childNodes->item($i);
696
697
            if ($childNode instanceof DOMElement) {
698
                $againstNodeList(
699
                    $node,
700
                    $childNode
701
                );
702
            }
703
        }
704
    }
705
}
706

src/SchemaReaderLoadAbstraction.php 2 locations

@@ 106-119 (lines=14) @@
103
        $max = static::loadSequenceNormaliseMax($node, $max);
104
105
        $limit = $node->childNodes->length;
106
        for ($i = 0; $i < $limit; $i += 1) {
107
            /**
108
            * @var DOMNode $childNode
109
            */
110
            $childNode = $node->childNodes->item($i);
111
            if ($childNode instanceof DOMElement) {
112
                $this->loadSequenceChildNode(
113
                    $elementContainer,
114
                    $node,
115
                    $childNode,
116
                    $max
117
                );
118
            }
119
        }
120
    }
121
122
    /**
@@ 520-532 (lines=13) @@
517
        DOMElement $node
518
    ) {
519
        $limit = $childNodes->length;
520
        for ($i = 0; $i < $limit; $i += 1) {
521
            /**
522
            * @var DOMElement $childNode
523
            */
524
            $childNode = $childNodes->item($i);
525
            if ($childNode instanceof DOMElement) {
526
                $this->loadExtensionChildNode(
527
                    $type,
528
                    $node,
529
                    $childNode
530
                );
531
            }
532
        }
533
    }
534
535
    protected function loadRestriction(Type $type, DOMElement $node)