Code Duplication    Length = 5-5 lines in 2 locations

src/OpenApi/OpenApiSchema.php 1 location

@@ 80-84 (lines=5) @@
77
                }
78
                $parameter = $this->jsonFile[self::SWAGGER_COMPONENTS][self::SWAGGER_PARAMETERS][$paramParts[3]];
79
            }
80
            if ($parameter['in'] === $parameterIn &&
81
                $parameter['schema']['type'] === "integer"
82
                && filter_var($arguments[$parameter['name']], FILTER_VALIDATE_INT) === false) {
83
                throw new NotMatchedException('Path expected an integer value');
84
            }
85
        }
86
    }
87

src/Swagger/SwaggerSchema.php 1 location

@@ 48-52 (lines=5) @@
45
    protected function validateArguments($parameterIn, $parameters, $arguments)
46
    {
47
        foreach ($parameters as $parameter) {
48
            if ($parameter['in'] === $parameterIn
49
                && $parameter['type'] === "integer"
50
                && filter_var($arguments[$parameter['name']], FILTER_VALIDATE_INT) === false) {
51
                throw new NotMatchedException('Path expected an integer value');
52
            }
53
        }
54
    }
55