meilisearch-php icon indicating copy to clipboard operation
meilisearch-php copied to clipboard

Complete return types in HTTP client

Open Strift opened this issue 4 months ago • 0 comments

The HTTP Client and Contract interface need more specific return types and PHPDoc annotations.

Files & Actions:

  1. src/Http/Client.php

    • execute(RequestInterface $request, array $headers = []): Add return type : mixed or PHPDoc @return array|null.
    • parseResponse(ResponseInterface $response): Add return type : mixed or PHPDoc @return array|null.
    • buildQueryString(array $queryParams = []): Add PHPDoc @param array<string, mixed> $queryParams.
  2. src/Contracts/Http.php

    • Update get (and similar methods) to include PHPDoc: @param array<string, scalar|list<scalar>> $query

Strift avatar Dec 11 '25 09:12 Strift