Code Duplication    Length = 5-5 lines in 3 locations

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

@@ 71-75 (lines=5) @@
68
                continue;
69
            }
70
71
            if (null !== $collectionOperations = $resourceMetadata->getCollectionOperations()) {
72
                foreach ($collectionOperations as $operationName => $operation) {
73
                    $annotations[] = $this->getApiDoc(true, $resourceClass, $resourceMetadata, $operationName, $resourceHydraDoc, $entrypointHydraDoc);
74
                }
75
            }
76
77
            if (null !== $itemOperations = $resourceMetadata->getItemOperations()) {
78
                foreach ($itemOperations as $operationName => $operation) {

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

@@ 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, OperationTypes::COLLECTION);
83
                }
84
            }
85
86
            if (null !== $itemOperations = $resourceMetadata->getItemOperations()) {
87
                foreach ($itemOperations as $operationName => $operation) {
@@ 86-90 (lines=5) @@
83
                }
84
            }
85
86
            if (null !== $itemOperations = $resourceMetadata->getItemOperations()) {
87
                foreach ($itemOperations as $operationName => $operation) {
88
                    $this->addRoute($routeCollection, $resourceClass, $operationName, $operation, $resourceShortName, OperationTypes::ITEM);
89
                }
90
            }
91
92
            $this->computeSubcollectionOperations($routeCollection, $resourceClass);
93
        }