meilisearch-php
meilisearch-php copied to clipboard
Typehint: Index instead of Indexes
Description
It has always felt unnatural for the index to be called Indexes.
We could deprecate the plural in version 1 and have version 2 return just Index.
OLD:
public function getIndex(string $indexCode): Indexes
{
return $this->client->index($indexCode);
}
NEW:
public function getIndex(string $indexCode): Index
{
return $this->client->index($indexCode);
}
Thanks for opening an issue!
I agree with this proposal. WDYT @brunoocasali @norkunas?
Feel free to open a PR to address this. :)
Sounds reasonable