Code Duplication    Length = 10-12 lines in 2 locations

src/DataProvider/ChainItemDataProvider.php 1 location

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

src/DataProvider/ChainSubresourceDataProvider.php 1 location

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