Code Duplication    Length = 3-3 lines in 3 locations

src/SchemaReader.php 3 locations

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