Add types to settings handling methods (HandlesSettings trait)

Open Beginner friendly
#844 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Stale
Tech stack
php
Domain
api

Research direction

Start by reading src/Endpoints/Delegates/HandlesSettings.php and src/Endpoints/Delegates/HandlesSystem.php, focusing on the named methods and their existing signatures or PHPDoc. Add the requested return, parameter, array-shape, and union type definitions, then verify that each declaration matches the methods' current inputs and outputs.

Written by the indexing model from the issue text.

Description

breaking-change

The HandlesSettings trait needs improvements regarding return types and parameter definitions.

File: src/Endpoints/Delegates/HandlesSettings.php

Action:

  • getSeparatorTokens(): Add PHPDoc @return list<non-empty-string>.
  • getEmbedders(): Add PHPDoc defining the embedder array shape.
  • updateEmbedders(array $embedders): Add PHPDoc defining the embedder array shape.

File: src/Endpoints/Delegates/HandlesSystem.php

  • generateTenantToken: Add type hint array|object for $searchRules.
  • swapIndexes: Add PHPDoc @param list<array{string, string}> $indexes.
Dominant language
PHP
Stars
757
Forks
125
Avg merge
6d 8h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from meilisearch/meilisearch-php

All issues in meilisearch/meilisearch-php

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.