Code Duplication    Length = 9-9 lines in 2 locations

src/TypeHandler.php 2 locations

@@ 73-81 (lines=9) @@
70
            return $type;
71
        }
72
73
        if ($this->isClassType($name)) {
74
            $type = new ObjectNode();
75
            $type->setType($name);
76
            $type->setTypeAlias('object');
77
            $type->setTypeHandler($this);
78
            $type->setInstantiator($this->defaultInstantiator);
79
80
            return $type;
81
        }
82
83
        if ($this->isCollectionType($name)) {
84
            $type = new CollectionNode();
@@ 83-91 (lines=9) @@
80
            return $type;
81
        }
82
83
        if ($this->isCollectionType($name)) {
84
            $type = new CollectionNode();
85
            $type->setType($this->getCollectionType($name));
86
            $type->setTypeAlias('object[]');
87
            $type->setTypeHandler($this);
88
            $type->setInstantiator($this->defaultInstantiator);
89
90
            return $type;
91
        }
92
93
        throw new \InvalidArgumentException('Unknown type name: ' . $name);
94
    }