*/ final readonly class GetBasketQuery implements Query { public function __construct( private BasketService $basketService, ) { } public function __invoke(QueryInput $input): Basket { Assert::isAOf( $input, QueryInputEmpty::class, ); return $this->basketService->getBasket(); } }