Code Duplication    Length = 4-9 lines in 3 locations

src/Hydra/ApiDocumentationBuilder.php 2 locations

@@ 319-327 (lines=9) @@
316
            break;
317
        }
318
319
        if (!isset($hydraOperation['returns']) &&
320
            (
321
                ('GET' === $method && !$collection) ||
322
                'POST' === $method ||
323
                'PUT' === $method
324
            )
325
        ) {
326
            $hydraOperation['returns'] = $prefixedShortName;
327
        }
328
329
        if (!isset($hydraOperation['expects']) &&
330
            ('POST' === $method || 'PUT' === $method)) {
@@ 329-332 (lines=4) @@
326
            $hydraOperation['returns'] = $prefixedShortName;
327
        }
328
329
        if (!isset($hydraOperation['expects']) &&
330
            ('POST' === $method || 'PUT' === $method)) {
331
            $hydraOperation['expects'] = $prefixedShortName;
332
        }
333
334
        if (!isset($hydraOperation['@type'])) {
335
            $hydraOperation['@type'] = 'hydra:Operation';

src/Swagger/ApiDocumentationBuilder.php 1 location

@@ 221-229 (lines=9) @@
218
                break;
219
        }
220
221
        if (!isset($swaggerOperation[$methodSwagger]['returns']) &&
222
            (
223
                ('GET' === $method && !$collection) ||
224
                'POST' === $method ||
225
                'PUT' === $method
226
            )
227
        ) {
228
            $swaggerOperation[$methodSwagger]['returns'] = $prefixedShortName;
229
        }
230
231
        if (!isset($swaggerOperation[$methodSwagger]['expects']) &&
232
            ('POST' === $method || 'PUT' === $method)) {