@@ -17,7 +17,7 @@ class Presets
1717 /**
1818 * @var ApiCall
1919 */
20- private ApiCall $ apiCall ;
20+ private $ apiCall ;
2121
2222 public const PRESETS_PATH = '/presets ' ;
2323
@@ -39,7 +39,7 @@ public function __construct(ApiCall $apiCall)
3939 * @throws HttpClientException
4040 * @throws TypesenseClientError
4141 */
42- public function searchWithPreset ($ presetName ): array | string
42+ public function searchWithPreset ($ presetName )
4343 {
4444 return $ this ->apiCall ->post ($ this ->multiSearchEndpointPath (), [], true , ['preset ' => $ presetName ]);
4545 }
@@ -49,7 +49,7 @@ public function searchWithPreset($presetName): array|string
4949 * @throws HttpClientException
5050 * @throws TypesenseClientError
5151 */
52- public function get (): array | string
52+ public function get ()
5353 {
5454 return $ this ->apiCall ->get (static ::PRESETS_PATH , []);
5555 }
@@ -61,10 +61,11 @@ public function get(): array|string
6161 * @throws HttpClientException
6262 * @throws TypesenseClientError
6363 */
64- public function put (array $ options = []): array
64+ public function put (array $ options = [])
6565 {
6666 $ presetName = $ options ['preset_name ' ];
6767 $ presetsData = $ options ['preset_data ' ];
68+
6869 return $ this ->apiCall ->put ($ this ->endpointPath ($ presetName ), $ presetsData );
6970 }
7071
@@ -74,7 +75,7 @@ public function put(array $options = []): array
7475 * @throws HttpClientException
7576 * @throws TypesenseClientError
7677 */
77- public function delete ($ presetName ): array
78+ public function delete ($ presetName )
7879 {
7980 return $ this ->apiCall ->delete ($ this ->endpointPath ($ presetName ));
8081 }
@@ -83,7 +84,7 @@ public function delete($presetName): array
8384 * @param $presetsName
8485 * @return string
8586 */
86- private function endpointPath ($ presetsName ): string
87+ private function endpointPath ($ presetsName )
8788 {
8889 return sprintf (
8990 '%s/%s ' ,
@@ -96,7 +97,7 @@ private function endpointPath($presetsName): string
9697 * @param $presetsName
9798 * @return string
9899 */
99- private function multiSearchEndpointPath (): string
100+ private function multiSearchEndpointPath ()
100101 {
101102 return sprintf (
102103 '%s ' ,
0 commit comments