Code Duplication    Length = 5-5 lines in 3 locations

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

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

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

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