Code Duplication    Length = 7-8 lines in 2 locations

src/Hydra/Serializer/DocumentationNormalizer.php 2 locations

@@ 274-280 (lines=7) @@
271
                'hydra:title' => $subresourceMetadata->isCollection() ? "Retrieves the collection of $shortName resources." : "Retrieves a $shortName resource.",
272
                'returns' => "#$shortName",
273
            ];
274
        } elseif ('GET' === $method) {
275
            $hydraOperation += [
276
                '@type' => ['hydra:Operation', 'schema:FindAction'],
277
                'hydra:title' => "Retrieves $shortName resource.",
278
                'returns' => $prefixedShortName,
279
            ];
280
        } elseif ('POST' === $method) {
281
            $hydraOperation += [
282
                '@type' => ['hydra:Operation', 'schema:CreateAction'],
283
                'hydra:title' => "Creates a $shortName resource.",
@@ 287-294 (lines=8) @@
284
                'returns' => $prefixedShortName,
285
                'expects' => $prefixedShortName,
286
            ];
287
        } elseif ('PUT' === $method) {
288
            $hydraOperation += [
289
                '@type' => ['hydra:Operation', 'schema:ReplaceAction'],
290
                'hydra:title' => "Replaces the $shortName resource.",
291
                'returns' => $prefixedShortName,
292
                'expects' => $prefixedShortName,
293
            ];
294
        } elseif ('DELETE' === $method) {
295
            $hydraOperation += [
296
                '@type' => ['hydra:Operation', 'schema:DeleteAction'],
297
                'hydra:title' => "Deletes the $shortName resource.",