| Conditions | 5 |
| Paths | 5 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function getCollection(string $resourceClass, string $operationName = null) |
||
| 40 | { |
||
| 41 | foreach ($this->dataProviders as $dataProvider) { |
||
| 42 | try { |
||
| 43 | if ($dataProvider instanceof RestrictedDataProviderInterface |
||
| 44 | && !$dataProvider->supports($resourceClass, $operationName)) { |
||
| 45 | continue; |
||
| 46 | } |
||
| 47 | |||
| 48 | return $dataProvider->getCollection($resourceClass, $operationName); |
||
| 49 | } catch (ResourceClassNotSupportedException $e) { |
||
| 50 | @trigger_error(sprintf('Throwing a "%s" is deprecated in favor of implementing "%s"', get_class($e), RestrictedDataProviderInterface::class), E_USER_DEPRECATED); |
||
|
|
|||
| 51 | continue; |
||
| 52 | } |
||
| 53 | } |
||
| 54 | } |
||
| 55 | } |
||
| 56 |
If you suppress an error, we recommend checking for the error condition explicitly: