Code Duplication    Length = 5-5 lines in 3 locations

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

@@ 88-92 (lines=5) @@
85
                continue;
86
            }
87
88
            if (null !== $collectionOperations = $resourceMetadata->getCollectionOperations()) {
89
                foreach ($collectionOperations as $operationName => $operation) {
90
                    $annotations[] = $this->getApiDoc(true, $resourceClass, $resourceMetadata, $operationName, $resourceHydraDoc, $entrypointHydraDoc);
91
                }
92
            }
93
94
            if (null !== $itemOperations = $resourceMetadata->getItemOperations()) {
95
                foreach ($itemOperations as $operationName => $operation) {

src/Bridge/Symfony/Routing/ApiLoader.php 2 locations

@@ 92-96 (lines=5) @@
89
                throw new InvalidResourceException(sprintf('Resource %s has no short name defined.', $resourceClass));
90
            }
91
92
            if (null !== $collectionOperations = $resourceMetadata->getCollectionOperations()) {
93
                foreach ($collectionOperations as $operationName => $operation) {
94
                    $this->addRoute($routeCollection, $resourceClass, $operationName, $operation, $resourceShortName, OperationType::COLLECTION);
95
                }
96
            }
97
98
            if (null !== $itemOperations = $resourceMetadata->getItemOperations()) {
99
                foreach ($itemOperations as $operationName => $operation) {
@@ 98-102 (lines=5) @@
95
                }
96
            }
97
98
            if (null !== $itemOperations = $resourceMetadata->getItemOperations()) {
99
                foreach ($itemOperations as $operationName => $operation) {
100
                    $this->addRoute($routeCollection, $resourceClass, $operationName, $operation, $resourceShortName, OperationType::ITEM);
101
                }
102
            }
103
104
            if (null === $this->subresourceOperationFactory) {
105
                continue;