Code Duplication    Length = 10-10 lines in 2 locations

src/DataProvider/ChainItemDataProvider.php 1 location

@@ 36-45 (lines=10) @@
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function getItem(string $resourceClass, $id, string $operationName = null, array $context = [])
37
    {
38
        foreach ($this->dataProviders as $dataProviders) {
39
            try {
40
                return $dataProviders->getItem($resourceClass, $id, $operationName, $context);
41
            } catch (ResourceClassNotSupportedException $e) {
42
                continue;
43
            }
44
        }
45
    }
46
}
47

src/DataProvider/ChainSubcollectionDataProvider.php 1 location

@@ 36-45 (lines=10) @@
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function getSubcollection(string $resourceClass, $id, string $subcollectionProperty, string $operationName = null, array $context = [])
37
    {
38
        foreach ($this->dataProviders as $dataProviders) {
39
            try {
40
                return $dataProviders->getSubcollection($resourceClass, $id, $subcollectionProperty, $operationName, $context);
41
            } catch (ResourceClassNotSupportedException $e) {
42
                continue;
43
            }
44
        }
45
    }
46
}
47