| Total Complexity | 5 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | trait ParsesPages |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * The number of items per page. |
||
| 19 | */ |
||
| 20 | protected int $itemsPerPage; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Yield paginated items and the given key from the provided response. |
||
| 24 | * |
||
| 25 | * @return Generator<int, mixed> |
||
| 26 | */ |
||
| 27 | 39 | protected function yieldItemsAndGetKey(ResponseInterface $response, string $key): Generator |
|
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Yield paginated items from the given source. |
||
| 53 | * |
||
| 54 | * @return Generator<int, mixed> |
||
| 55 | */ |
||
| 56 | 40 | protected function yieldItemsFrom(mixed $source): Generator |
|
| 62 |