Code Duplication    Length = 3-3 lines in 3 locations

src/SchemaReader.php 3 locations

@@ 221-223 (lines=3) @@
218
        $ref = new GroupRef($referenced);
219
        $ref->setDoc($this->getDocumentation($node));
220
221
        if ($node->hasAttribute("maxOccurs")) {
222
            $ref->setMax($node->getAttribute("maxOccurs") == "unbounded" ? -1 : (int)$node->getAttribute("maxOccurs"));
223
        }
224
        if ($node->hasAttribute("minOccurs")) {
225
            $ref->setMin((int)$node->getAttribute("minOccurs"));
226
        }
@@ 236-238 (lines=3) @@
233
        $ref = new ElementRef($referenced);
234
        $ref->setDoc($this->getDocumentation($node));
235
236
        if ($node->hasAttribute("maxOccurs")) {
237
            $ref->setMax($node->getAttribute("maxOccurs") == "unbounded" ? -1 : (int)$node->getAttribute("maxOccurs"));
238
        }
239
        if ($node->hasAttribute("minOccurs")) {
240
            $ref->setMin((int)$node->getAttribute("minOccurs"));
241
        }
@@ 309-311 (lines=3) @@
306
        $group = new Group($schema, $node->getAttribute("name"));
307
        $group->setDoc($this->getDocumentation($node));
308
309
        if ($node->hasAttribute("maxOccurs")) {
310
            $group->setMax($node->getAttribute("maxOccurs") == "unbounded" ? -1 : (int)$node->getAttribute("maxOccurs"));
311
        }
312
        if ($node->hasAttribute("minOccurs")) {
313
            $group->setMin((int)$node->getAttribute("minOccurs"));
314
        }