Skip to content

Commit

Permalink
Remove the response value object
Browse files Browse the repository at this point in the history
  • Loading branch information
cerbero90 committed Jan 20, 2024
1 parent f0d8593 commit ee100c9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 99 deletions.
3 changes: 1 addition & 2 deletions src/LazyJsonPages.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Cerbero\LazyJsonPages\Paginations\AnyPagination;
use Cerbero\LazyJsonPages\Services\Client;
use Cerbero\LazyJsonPages\Sources\AnySource;
use Cerbero\LazyJsonPages\ValueObjects\Response;
use Closure;
use GuzzleHttp\RequestOptions;
use Illuminate\Support\LazyCollection;
Expand Down Expand Up @@ -129,7 +128,7 @@ public function perPage(int $items, ?string $key = null, int $firstPageItems = 1
*/
public function nextPage(Closure|string $key): self
{
$this->config['nextPage'] = $key instanceof Closure ? $key : fn(Response $response) => $response->get($key);
$this->config['nextPage'] = $this->valueFromResponse($key);

return $this;
}
Expand Down
97 changes: 0 additions & 97 deletions src/ValueObjects/Response.php

This file was deleted.

0 comments on commit ee100c9

Please sign in to comment.