Skip to content

Commit

Permalink
Merge #610
Browse files Browse the repository at this point in the history
610: Use proper typehint for proximityPrecision r=curquiza a=norkunas

# Pull Request

## Related issue
Fixes #606 (comment)

## What does this PR do?
- Declares proper typehint to know what values may be returned/accepted.

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?


Co-authored-by: Tomas <[email protected]>
  • Loading branch information
meili-bors[bot] and norkunas authored Jan 17, 2024
2 parents 4dbb26d + e39d1da commit 4810abd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Endpoints/Delegates/HandlesSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,16 @@ public function resetNonSeparatorTokens(): array
// Settings - proximityPrecision

/**
* @return non-empty-string
* @return 'byWord'|'byAttribute'
*/
public function getProximityPrecision(): string
{
return $this->http->get(self::PATH.'/'.$this->uid.'/settings/proximity-precision');
}

/**
* @param 'byWord'|'byAttribute' $type
*/
public function updateProximityPrecision(string $type): array
{
return $this->http->put(self::PATH.'/'.$this->uid.'/settings/proximity-precision', $type);
Expand Down

0 comments on commit 4810abd

Please sign in to comment.