Code Duplication    Length = 7-8 lines in 2 locations

src/Bridge/Doctrine/Orm/ItemDataProvider.php 1 location

@@ 49-55 (lines=7) @@
46
     * @param PropertyMetadataFactoryInterface       $propertyMetadataFactory
47
     * @param QueryItemExtensionInterface[]          $itemExtensions
48
     */
49
    public function __construct(ManagerRegistry $managerRegistry, PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, PropertyMetadataFactoryInterface $propertyMetadataFactory, array $itemExtensions = [])
50
    {
51
        $this->managerRegistry = $managerRegistry;
52
        $this->propertyNameCollectionFactory = $propertyNameCollectionFactory;
53
        $this->propertyMetadataFactory = $propertyMetadataFactory;
54
        $this->itemExtensions = $itemExtensions;
55
    }
56
57
    public function supports(string $resourceClass, string $operationName = null): bool
58
    {

src/Bridge/Doctrine/Orm/SubresourceDataProvider.php 1 location

@@ 53-60 (lines=8) @@
50
     * @param QueryCollectionExtensionInterface[]    $collectionExtensions
51
     * @param QueryItemExtensionInterface[]          $itemExtensions
52
     */
53
    public function __construct(ManagerRegistry $managerRegistry, PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, PropertyMetadataFactoryInterface $propertyMetadataFactory, array $collectionExtensions = [], array $itemExtensions = [])
54
    {
55
        $this->managerRegistry = $managerRegistry;
56
        $this->propertyNameCollectionFactory = $propertyNameCollectionFactory;
57
        $this->propertyMetadataFactory = $propertyMetadataFactory;
58
        $this->collectionExtensions = $collectionExtensions;
59
        $this->itemExtensions = $itemExtensions;
60
    }
61
62
    /**
63
     * {@inheritdoc}