@@ -54,7 +54,7 @@ public static function create($appId = null, $apiKey = null, $region = null)
54
54
}
55
55
56
56
/**
57
- * Instantiate the client with congiguration
57
+ * Instantiate the client with configuration
58
58
*
59
59
* @param AbtestingConfig $config Configuration
60
60
*/
@@ -90,8 +90,13 @@ public function getClientConfig()
90
90
* Creates a new A/B test with provided configuration.
91
91
*
92
92
* @param array $addABTestsRequest addABTestsRequest (required)
93
+ * - $addABTestsRequest['name'] => (string) A/B test name. (required)
94
+ * - $addABTestsRequest['variant'] => (array) List of 2 variants for the A/B test. (required)
95
+ * - $addABTestsRequest['endAt'] => (string) End date for the A/B test expressed as YYYY-MM-DDThh:mm:ssZ. (required)
93
96
*
94
- * @return array<string, mixed>
97
+ * @see \Algolia\AlgoliaSearch\Model\Abtesting\AddABTestsRequest
98
+ *
99
+ * @return array<string, mixed>|\Algolia\AlgoliaSearch\Model\Abtesting\ABTestResponse
95
100
*/
96
101
public function addABTests ($ addABTestsRequest )
97
102
{
@@ -120,7 +125,7 @@ public function addABTests($addABTestsRequest)
120
125
* @param array $parameters Query parameters to be applied to the current query. (optional)
121
126
* @param array $body The parameters to send with the custom request. (optional)
122
127
*
123
- * @return array<string, mixed>
128
+ * @return array<string, mixed>|object
124
129
*/
125
130
public function del ($ path , $ parameters = null , $ body = null )
126
131
{
@@ -149,7 +154,7 @@ public function del($path, $parameters = null, $body = null)
149
154
if ($ path !== null ) {
150
155
$ resourcePath = str_replace (
151
156
'{path} ' ,
152
- path,
157
+ $ path ,
153
158
$ resourcePath
154
159
);
155
160
}
@@ -166,7 +171,7 @@ public function del($path, $parameters = null, $body = null)
166
171
*
167
172
* @param int $id The A/B test ID. (required)
168
173
*
169
- * @return array<string, mixed>
174
+ * @return array<string, mixed>|\Algolia\AlgoliaSearch\Model\Abtesting\ABTestResponse
170
175
*/
171
176
public function deleteABTest ($ id )
172
177
{
@@ -199,7 +204,7 @@ public function deleteABTest($id)
199
204
* @param string $path The path of the API endpoint to target, anything after the /1 needs to be specified. (required)
200
205
* @param array $parameters Query parameters to be applied to the current query. (optional)
201
206
*
202
- * @return array<string, mixed>
207
+ * @return array<string, mixed>|object
203
208
*/
204
209
public function get ($ path , $ parameters = null )
205
210
{
@@ -228,7 +233,7 @@ public function get($path, $parameters = null)
228
233
if ($ path !== null ) {
229
234
$ resourcePath = str_replace (
230
235
'{path} ' ,
231
- path,
236
+ $ path ,
232
237
$ resourcePath
233
238
);
234
239
}
@@ -241,7 +246,7 @@ public function get($path, $parameters = null)
241
246
*
242
247
* @param int $id The A/B test ID. (required)
243
248
*
244
- * @return array<string, mixed>
249
+ * @return array<string, mixed>|\Algolia\AlgoliaSearch\Model\Abtesting\ABTest
245
250
*/
246
251
public function getABTest ($ id )
247
252
{
@@ -274,7 +279,7 @@ public function getABTest($id)
274
279
* @param int $offset Position of the starting record. Used for paging. 0 is the first record. (optional, default to 0)
275
280
* @param int $limit Number of records to return. Limit is the size of the page. (optional, default to 10)
276
281
*
277
- * @return array<string, mixed>
282
+ * @return array<string, mixed>|\Algolia\AlgoliaSearch\Model\Abtesting\ListABTestsResponse
278
283
*/
279
284
public function listABTests ($ offset = 0 , $ limit = 10 )
280
285
{
@@ -312,7 +317,7 @@ public function listABTests($offset = 0, $limit = 10)
312
317
* @param array $parameters Query parameters to be applied to the current query. (optional)
313
318
* @param array $body The parameters to send with the custom request. (optional)
314
319
*
315
- * @return array<string, mixed>
320
+ * @return array<string, mixed>|object
316
321
*/
317
322
public function post ($ path , $ parameters = null , $ body = null )
318
323
{
@@ -341,7 +346,7 @@ public function post($path, $parameters = null, $body = null)
341
346
if ($ path !== null ) {
342
347
$ resourcePath = str_replace (
343
348
'{path} ' ,
344
- path,
349
+ $ path ,
345
350
$ resourcePath
346
351
);
347
352
}
@@ -360,7 +365,7 @@ public function post($path, $parameters = null, $body = null)
360
365
* @param array $parameters Query parameters to be applied to the current query. (optional)
361
366
* @param array $body The parameters to send with the custom request. (optional)
362
367
*
363
- * @return array<string, mixed>
368
+ * @return array<string, mixed>|object
364
369
*/
365
370
public function put ($ path , $ parameters = null , $ body = null )
366
371
{
@@ -389,7 +394,7 @@ public function put($path, $parameters = null, $body = null)
389
394
if ($ path !== null ) {
390
395
$ resourcePath = str_replace (
391
396
'{path} ' ,
392
- path,
397
+ $ path ,
393
398
$ resourcePath
394
399
);
395
400
}
@@ -406,7 +411,7 @@ public function put($path, $parameters = null, $body = null)
406
411
*
407
412
* @param int $id The A/B test ID. (required)
408
413
*
409
- * @return array<string, mixed>
414
+ * @return array<string, mixed>|\Algolia\AlgoliaSearch\Model\Abtesting\ABTestResponse
410
415
*/
411
416
public function stopABTest ($ id )
412
417
{
0 commit comments