Code Duplication    Length = 15-15 lines in 2 locations

src/Generator/Parameter/BodyParameterGenerator.php 1 location

@@ 119-133 (lines=15) @@
116
     *
117
     * @return mixed
118
     */
119
    private function resolveSchema(Reference $reference, $class)
120
    {
121
        $result    = $reference;
122
123
        do {
124
            $refString = (string) $reference->getMergedUri();
125
            $result = $result->resolve(function ($data) use($result, $class) {
126
                return $this->denormalizer->denormalize($data, $class, 'json', [
127
                    'document-origin' => (string) $result->getMergedUri()->withFragment('')
128
                ]);
129
            });
130
        } while ($result instanceof Reference);
131
132
        return [$refString, $result];
133
    }
134
}
135

src/Generator/OutputGeneratorTrait.php 1 location

@@ 94-108 (lines=15) @@
91
     *
92
     * @return mixed
93
     */
94
    private function resolve(Reference $reference, $class)
95
    {
96
        $result    = $reference;
97
98
        do {
99
            $refString = (string) $reference->getMergedUri();
100
            $result = $result->resolve(function ($data) use($result, $class) {
101
                return $this->getDenormalizer()->denormalize($data, $class, 'json', [
102
                    'document-origin' => (string) $result->getMergedUri()->withFragment('')
103
                ]);
104
            });
105
        } while ($result instanceof Reference);
106
107
        return [$refString, $result];
108
    }
109
}
110