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

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