Code Duplication    Length = 5-5 lines in 2 locations

src/Bridge/Symfony/Routing/ApiLoader.php 1 location

@@ 80-84 (lines=5) @@
77
                throw new InvalidResourceException(sprintf('Resource %s has no short name defined.', $resourceClass));
78
            }
79
80
            if (null !== $collectionOperations = $resourceMetadata->getCollectionOperations()) {
81
                foreach ($collectionOperations as $operationName => $operation) {
82
                    $this->addRoute($routeCollection, $resourceClass, $operationName, $operation, $resourceShortName, true);
83
                }
84
            }
85
86
            if (null !== $itemOperations = $resourceMetadata->getItemOperations()) {
87
                foreach ($itemOperations as $operationName => $operation) {

src/Bridge/NelmioApiDoc/Extractor/AnnotationsProvider/ApiPlatformProvider.php 1 location

@@ 77-81 (lines=5) @@
74
                continue;
75
            }
76
77
            if (null !== $collectionOperations = $resourceMetadata->getCollectionOperations()) {
78
                foreach ($collectionOperations as $operationName => $operation) {
79
                    $annotations[] = $this->getApiDoc(true, $resourceClass, $resourceMetadata, $operationName, $resourceHydraDoc, $entrypointHydraDoc);
80
                }
81
            }
82
83
            if (null !== $itemOperations = $resourceMetadata->getItemOperations()) {
84
                foreach ($itemOperations as $operationName => $operation) {