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

Add missing types to Endpoints\Indexes

Open Strift opened this issue 4 months ago • 0 comments

The Indexes endpoint class requires updates to Method signatures and PHPDoc to support stricter typing.

File: src/Endpoints/Indexes.php

Action:

  • newInstance(array $attributes): Add specific PHPDoc array shape.
  • fill(array $attributes): Add specific PHPDoc array shape.
  • create(string $uid, array $options = []): Add PHPDoc @param array{primaryKey?: string} $options.
  • update(array $body): Add PHPDoc defining the expected shape of $body.
  • rawSearch(?string $query, array $searchParams = []): Add PHPDoc defining the return array shape.
  • stats(): Add explicit return type (e.g., IndexStats object) or specific PHPDoc.
  • getSettings(): Add PHPDoc for return array shape.
  • updateSettings($settings): Add type hint updateSettings(array $settings) (or accept a Settings object).

Strift avatar Dec 11 '25 09:12 Strift