Skip to content

Complete return types in HTTP client #847

@Strift

Description

@Strift

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking-changeThe related changes are breaking for the users

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions