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

@@ 79-83 (lines=5) @@
76
                throw new InvalidResourceException(sprintf('Resource %s has no short name defined.', $resourceClass));
77
            }
78
79
            if (null !== $collectionOperations = $resourceMetadata->getCollectionOperations()) {
80
                foreach ($collectionOperations as $operationName => $operation) {
81
                    $this->addRoute($routeCollection, $resourceClass, $operationName, $operation, $resourceShortName, OperationTypes::COLLECTION);
82
                }
83
            }
84
85
            if (null !== $itemOperations = $resourceMetadata->getItemOperations()) {
86
                foreach ($itemOperations as $operationName => $operation) {
@@ 85-89 (lines=5) @@
82
                }
83
            }
84
85
            if (null !== $itemOperations = $resourceMetadata->getItemOperations()) {
86
                foreach ($itemOperations as $operationName => $operation) {
87
                    $this->addRoute($routeCollection, $resourceClass, $operationName, $operation, $resourceShortName, OperationTypes::ITEM);
88
                }
89
            }
90
91
            foreach ($this->propertyNameCollectionFactory->create($resourceClass) as $property) {
92
                $propertyMetadata = $this->propertyMetadataFactory->create($resourceClass, $property);