Code Duplication    Length = 3-3 lines in 3 locations

src/SchemaReader.php 3 locations

@@ 226-228 (lines=3) @@
223
        $ref = new GroupRef($referenced);
224
        $ref->setDoc($this->getDocumentation($node));
225
226
        if ($node->hasAttribute("maxOccurs")) {
227
            $ref->setMax($node->getAttribute("maxOccurs") == "unbounded" ? -1 : (int)$node->getAttribute("maxOccurs"));
228
        }
229
        if ($node->hasAttribute("minOccurs")) {
230
            $ref->setMin((int)$node->getAttribute("minOccurs"));
231
        }
@@ 241-243 (lines=3) @@
238
        $ref = new ElementRef($referenced);
239
        $ref->setDoc($this->getDocumentation($node));
240
241
        if ($node->hasAttribute("maxOccurs")) {
242
            $ref->setMax($node->getAttribute("maxOccurs") == "unbounded" ? -1 : (int)$node->getAttribute("maxOccurs"));
243
        }
244
        if ($node->hasAttribute("minOccurs")) {
245
            $ref->setMin((int)$node->getAttribute("minOccurs"));
246
        }
@@ 314-316 (lines=3) @@
311
        $group = new Group($schema, $node->getAttribute("name"));
312
        $group->setDoc($this->getDocumentation($node));
313
314
        if ($node->hasAttribute("maxOccurs")) {
315
            $group->setMax($node->getAttribute("maxOccurs") == "unbounded" ? -1 : (int)$node->getAttribute("maxOccurs"));
316
        }
317
        if ($node->hasAttribute("minOccurs")) {
318
            $group->setMin((int)$node->getAttribute("minOccurs"));
319
        }