| Conditions | 2 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | 1 | public function obtainAll(): Customers |
|
| 26 | { |
||
| 27 | 1 | $page = 0; |
|
| 28 | 1 | $result = new Customers([]); |
|
| 29 | |||
| 30 | do { |
||
| 31 | 1 | $page = $page + 1; |
|
| 32 | 1 | $command = new ObtainCustomersCommand($page); |
|
| 33 | 1 | $current = $this->obtainPage($command); |
|
| 34 | 1 | $result = $result->merge($current->customers()); |
|
| 35 | 1 | } while ($current->pagesInformation()->hasMorePages()); |
|
| 36 | |||
| 37 | 1 | return $result; |
|
| 38 | } |
||
| 53 |