Code Duplication    Length = 3-3 lines in 2 locations

src/OpenApi/OpenApiSchema.php 1 location

@@ 108-110 (lines=3) @@
105
    {
106
        $nameParts = explode('/', $name);
107
108
        if (count($nameParts) < 4 || $nameParts[0] !== '#') {
109
            throw new InvalidDefinitionException('Invalid Component');
110
        }
111
112
        if (!isset($this->jsonFile[$nameParts[1]][$nameParts[2]][$nameParts[3]])) {
113
            throw new DefinitionNotFoundException("Component'$name' not found");

src/Swagger/SwaggerSchema.php 1 location

@@ 85-87 (lines=3) @@
82
    {
83
        $nameParts = explode('/', $name);
84
85
        if (count($nameParts) < 3 || $nameParts[0] !== '#') {
86
            throw new InvalidDefinitionException('Invalid Definition');
87
        }
88
89
        if (!isset($this->jsonFile[$nameParts[1]][$nameParts[2]])) {
90
            throw new DefinitionNotFoundException("Definition '$name' not found");