Code Duplication    Length = 3-3 lines in 2 locations

src/SwaggerSchema.php 2 locations

@@ 179-181 (lines=3) @@
176
        $nameParts = explode('/', $name);
177
178
        if ($this->getSpecificationVersion() === '3') {
179
            if (count($nameParts) < 4 || $nameParts[0] !== '#') {
180
                throw new InvalidDefinitionException('Invalid Component');
181
            }
182
183
            if (!isset($this->jsonFile[$nameParts[1]][$nameParts[2]][$nameParts[3]])) {
184
                throw new DefinitionNotFoundException("Component'$name' not found");
@@ 190-192 (lines=3) @@
187
            return $this->jsonFile[$nameParts[1]][$nameParts[2]][$nameParts[3]];
188
        }
189
190
        if (count($nameParts) < 3 || $nameParts[0] !== '#') {
191
            throw new InvalidDefinitionException('Invalid Definition');
192
        }
193
194
        if (!isset($this->jsonFile[$nameParts[1]][$nameParts[2]])) {
195
            throw new DefinitionNotFoundException("Definition '$name' not found");