Code Duplication    Length = 7-8 lines in 2 locations

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

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

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}