Code Duplication    Length = 3-3 lines in 3 locations

src/SchemaReader.php 3 locations

@@ 229-231 (lines=3) @@
226
        $ref = new GroupRef($referenced);
227
        $ref->setDoc($this->getDocumentation($node));
228
229
        if ($node->hasAttribute("maxOccurs")) {
230
            $ref->setMax($node->getAttribute("maxOccurs") == "unbounded" ? -1 : (int)$node->getAttribute("maxOccurs"));
231
        }
232
        if ($node->hasAttribute("minOccurs")) {
233
            $ref->setMin((int)$node->getAttribute("minOccurs"));
234
        }
@@ 244-246 (lines=3) @@
241
        $ref = new ElementRef($referenced);
242
        $ref->setDoc($this->getDocumentation($node));
243
244
        if ($node->hasAttribute("maxOccurs")) {
245
            $ref->setMax($node->getAttribute("maxOccurs") == "unbounded" ? -1 : (int)$node->getAttribute("maxOccurs"));
246
        }
247
        if ($node->hasAttribute("minOccurs")) {
248
            $ref->setMin((int)$node->getAttribute("minOccurs"));
249
        }
@@ 317-319 (lines=3) @@
314
        $group = new Group($schema, $node->getAttribute("name"));
315
        $group->setDoc($this->getDocumentation($node));
316
317
        if ($node->hasAttribute("maxOccurs")) {
318
            $group->setMax($node->getAttribute("maxOccurs") == "unbounded" ? -1 : (int)$node->getAttribute("maxOccurs"));
319
        }
320
        if ($node->hasAttribute("minOccurs")) {
321
            $group->setMin((int)$node->getAttribute("minOccurs"));
322
        }