Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
49 | 2 | protected function handleByNextPage(): Traversable |
|
50 | { |
||
51 | 2 | $request = clone $this->config->source->request; |
|
52 | |||
53 | 2 | yield from $this->config->source->json($this->config->path); |
|
54 | |||
55 | 2 | while ($this->config->nextPage) { |
|
56 | 2 | $uri = Uri::withQueryValue($request->getUri(), $this->config->pageName, $this->config->nextPage); |
|
57 | 2 | $this->config->source = new SourceWrapper($request->withUri($uri)); |
|
58 | 2 | $this->config->nextPage($this->config->nextPageKey); |
|
59 | 2 | yield from $this->handleByNextPage(); |
|
60 | } |
||
63 |