diff --git a/src/Client/Endpoint/ProductEndpoint.php b/src/Client/Endpoint/ProductEndpoint.php index 44a4fd8..224ddce 100644 --- a/src/Client/Endpoint/ProductEndpoint.php +++ b/src/Client/Endpoint/ProductEndpoint.php @@ -24,8 +24,10 @@ final class ProductEndpoint extends Endpoint implements ProductEndpointInterface /** * @return PaginatedCollection */ - public function getPage(PageQuery $query): PaginatedCollection + public function getPage(PageQuery $query = null): PaginatedCollection { + $query ??= PageQuery::create(); + /** @var class-string> $signature */ $signature = sprintf('%s<%s>', PaginatedCollection::class, self::getDataClass()); diff --git a/src/Client/Endpoint/ProductEndpointInterface.php b/src/Client/Endpoint/ProductEndpointInterface.php index 6087349..e5bb0b4 100644 --- a/src/Client/Endpoint/ProductEndpointInterface.php +++ b/src/Client/Endpoint/ProductEndpointInterface.php @@ -18,7 +18,7 @@ interface ProductEndpointInterface extends EndpointInterface, CreatableEndpointI /** * @return PaginatedCollection */ - public function getPage(PageQuery $query): PaginatedCollection; + public function getPage(PageQuery $query = null): PaginatedCollection; /** * @return Collection