Skip to content

Commit 8e802ee

Browse files
committed
make the locale param optional
1 parent 6c67390 commit 8e802ee

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

src/Stopwords.php

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,15 @@ public function getAll()
5555
}
5656

5757
/**
58-
* @param array $options
58+
* @param array $stopwordSet
5959
*
6060
* @return array
6161
* @throws HttpClientException
6262
* @throws TypesenseClientError
6363
*/
64-
public function put(array $options = [])
64+
public function put(array $stopwordSet)
6565
{
66-
$stopwordsName = $options['name'];
67-
$stopwordsData = $options['stopwords'];
68-
$stopwordsLocale = $options['locale'];
69-
return $this->apiCall->put(
70-
$this->endpointPath($stopwordsName),
71-
[
72-
'stopwords' => $stopwordsData,
73-
'locale' => $stopwordsLocale
74-
]
75-
);
66+
return $this->apiCall->put($this->endpointPath($stopwordSet['name']), $stopwordSet);
7667
}
7768

7869
/**

0 commit comments

Comments
 (0)