@@ -17,7 +17,7 @@ class Presets
17
17
/**
18
18
* @var ApiCall
19
19
*/
20
- private ApiCall $ apiCall ;
20
+ private $ apiCall ;
21
21
22
22
public const PRESETS_PATH = '/presets ' ;
23
23
@@ -39,7 +39,7 @@ public function __construct(ApiCall $apiCall)
39
39
* @throws HttpClientException
40
40
* @throws TypesenseClientError
41
41
*/
42
- public function searchWithPreset ($ presetName ): array | string
42
+ public function searchWithPreset ($ presetName )
43
43
{
44
44
return $ this ->apiCall ->post ($ this ->multiSearchEndpointPath (), [], true , ['preset ' => $ presetName ]);
45
45
}
@@ -49,7 +49,7 @@ public function searchWithPreset($presetName): array|string
49
49
* @throws HttpClientException
50
50
* @throws TypesenseClientError
51
51
*/
52
- public function get (): array | string
52
+ public function get ()
53
53
{
54
54
return $ this ->apiCall ->get (static ::PRESETS_PATH , []);
55
55
}
@@ -61,10 +61,11 @@ public function get(): array|string
61
61
* @throws HttpClientException
62
62
* @throws TypesenseClientError
63
63
*/
64
- public function put (array $ options = []): array
64
+ public function put (array $ options = [])
65
65
{
66
66
$ presetName = $ options ['preset_name ' ];
67
67
$ presetsData = $ options ['preset_data ' ];
68
+
68
69
return $ this ->apiCall ->put ($ this ->endpointPath ($ presetName ), $ presetsData );
69
70
}
70
71
@@ -74,7 +75,7 @@ public function put(array $options = []): array
74
75
* @throws HttpClientException
75
76
* @throws TypesenseClientError
76
77
*/
77
- public function delete ($ presetName ): array
78
+ public function delete ($ presetName )
78
79
{
79
80
return $ this ->apiCall ->delete ($ this ->endpointPath ($ presetName ));
80
81
}
@@ -83,7 +84,7 @@ public function delete($presetName): array
83
84
* @param $presetsName
84
85
* @return string
85
86
*/
86
- private function endpointPath ($ presetsName ): string
87
+ private function endpointPath ($ presetsName )
87
88
{
88
89
return sprintf (
89
90
'%s/%s ' ,
@@ -96,7 +97,7 @@ private function endpointPath($presetsName): string
96
97
* @param $presetsName
97
98
* @return string
98
99
*/
99
- private function multiSearchEndpointPath (): string
100
+ private function multiSearchEndpointPath ()
100
101
{
101
102
return sprintf (
102
103
'%s ' ,
0 commit comments