Code Duplication    Length = 10-10 lines in 2 locations

src/Swagger/ApiDocumentationBuilder.php 2 locations

@@ 151-160 (lines=10) @@
148
                }
149
            }
150
151
            if ($operations = $resourceMetadata->getItemOperations()) {
152
                foreach ($operations as $operationName => $itemOperation) {
153
                    $method = $this->operationMethodResolver->getItemOperationMethod($resourceClass, $operationName);
154
                    $swaggerOperation = $this->getSwaggerOperation($resourceClass, $resourceMetadata, $operationName, $itemOperation, $prefixedShortName, false, $definitions, $method);
155
                    $operation['item'] = array_merge($operation['item'], $swaggerOperation);
156
                    if ($operationName !== strtolower($method)) {
157
                        $customOperations['item'][] = $operationName;
158
                    }
159
                }
160
            }
161
162
            if ($operations = $resourceMetadata->getCollectionOperations()) {
163
                foreach ($operations as $operationName => $collectionOperation) {
@@ 162-171 (lines=10) @@
159
                }
160
            }
161
162
            if ($operations = $resourceMetadata->getCollectionOperations()) {
163
                foreach ($operations as $operationName => $collectionOperation) {
164
                    $method = $this->operationMethodResolver->getCollectionOperationMethod($resourceClass, $operationName);
165
                    $swaggerOperation = $this->getSwaggerOperation($resourceClass, $resourceMetadata, $operationName, $collectionOperation, $prefixedShortName, true, $definitions, $method);
166
                    $operation['collection'] = array_merge($operation['collection'], $swaggerOperation);
167
                    if ($operationName !== strtolower($method)) {
168
                        $customOperations['collection'][] = $operationName;
169
                    }
170
                }
171
            }
172
            try {
173
                $resourceClassIri = $this->iriConverter->getIriFromResourceClass($resourceClass);
174
                $itemOperationsDocs[$resourceClassIri] = $operation['collection'];