Code Duplication    Length = 7-7 lines in 2 locations

src/Bridge/Doctrine/Orm/Util/EagerLoadingTrait.php 1 location

@@ 70-76 (lines=7) @@
67
    {
68
        $resourceMetadata = $this->resourceMetadataFactory->create($resourceClass);
69
70
        if (isset($options['collection_operation_name'])) {
71
            $attribute = $resourceMetadata->getCollectionOperationAttribute($options['collection_operation_name'], $attributeName, null, true);
72
        } elseif (isset($options['item_operation_name'])) {
73
            $attribute = $resourceMetadata->getItemOperationAttribute($options['item_operation_name'], $attributeName, null, true);
74
        } else {
75
            $attribute = $resourceMetadata->getAttribute($attributeName);
76
        }
77
78
        return is_bool($attribute) ? $attribute : $default;
79
    }

src/Bridge/Doctrine/Orm/Extension/EagerLoadingExtension.php 1 location

@@ 234-240 (lines=7) @@
231
232
        $resourceMetadata = $this->resourceMetadataFactory->create($resourceClass);
233
234
        if (isset($options['collection_operation_name'])) {
235
            $context = $resourceMetadata->getCollectionOperationAttribute($options['collection_operation_name'], $context, null, true);
236
        } elseif (isset($options['item_operation_name'])) {
237
            $context = $resourceMetadata->getItemOperationAttribute($options['item_operation_name'], $context, null, true);
238
        } else {
239
            $context = $resourceMetadata->getAttribute($context);
240
        }
241
242
        if (empty($context['groups'])) {
243
            return $options;