Skip to content

Commit 2d92723

Browse files
algolia-botaykutersoyshortcuts
committed
fix(php): Deprecation warning fix for PHP 8.1+ (#3562) (generated) [skip ci]
Co-authored-by: Aykut Ersoy <[email protected]> Co-authored-by: shortcuts <[email protected]>
1 parent 675fc78 commit 2d92723

File tree

420 files changed

+1680
-2520
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

420 files changed

+1680
-2520
lines changed

clients/algoliasearch-client-php/lib/Model/Abtesting/ABTest.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,8 @@ public function setConfiguration($configuration)
605605
* Returns true if offset exists. False otherwise.
606606
*
607607
* @param int $offset Offset
608-
*
609-
* @return bool
610608
*/
611-
public function offsetExists($offset)
609+
public function offsetExists($offset): bool
612610
{
613611
return isset($this->container[$offset]);
614612
}
@@ -620,7 +618,7 @@ public function offsetExists($offset)
620618
*
621619
* @return null|mixed
622620
*/
623-
public function offsetGet($offset)
621+
public function offsetGet($offset): mixed
624622
{
625623
return $this->container[$offset] ?? null;
626624
}
@@ -631,7 +629,7 @@ public function offsetGet($offset)
631629
* @param null|int $offset Offset
632630
* @param mixed $value Value to be set
633631
*/
634-
public function offsetSet($offset, $value)
632+
public function offsetSet($offset, $value): void
635633
{
636634
if (is_null($offset)) {
637635
$this->container[] = $value;
@@ -645,7 +643,7 @@ public function offsetSet($offset, $value)
645643
*
646644
* @param int $offset Offset
647645
*/
648-
public function offsetUnset($offset)
646+
public function offsetUnset($offset): void
649647
{
650648
unset($this->container[$offset]);
651649
}

clients/algoliasearch-client-php/lib/Model/Abtesting/ABTestConfiguration.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,8 @@ public function setMinimumDetectableEffect($minimumDetectableEffect)
250250
* Returns true if offset exists. False otherwise.
251251
*
252252
* @param int $offset Offset
253-
*
254-
* @return bool
255253
*/
256-
public function offsetExists($offset)
254+
public function offsetExists($offset): bool
257255
{
258256
return isset($this->container[$offset]);
259257
}
@@ -265,7 +263,7 @@ public function offsetExists($offset)
265263
*
266264
* @return null|mixed
267265
*/
268-
public function offsetGet($offset)
266+
public function offsetGet($offset): mixed
269267
{
270268
return $this->container[$offset] ?? null;
271269
}
@@ -276,7 +274,7 @@ public function offsetGet($offset)
276274
* @param null|int $offset Offset
277275
* @param mixed $value Value to be set
278276
*/
279-
public function offsetSet($offset, $value)
277+
public function offsetSet($offset, $value): void
280278
{
281279
if (is_null($offset)) {
282280
$this->container[] = $value;
@@ -290,7 +288,7 @@ public function offsetSet($offset, $value)
290288
*
291289
* @param int $offset Offset
292290
*/
293-
public function offsetUnset($offset)
291+
public function offsetUnset($offset): void
294292
{
295293
unset($this->container[$offset]);
296294
}

clients/algoliasearch-client-php/lib/Model/Abtesting/ABTestResponse.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,8 @@ public function setTaskID($taskID)
254254
* Returns true if offset exists. False otherwise.
255255
*
256256
* @param int $offset Offset
257-
*
258-
* @return bool
259257
*/
260-
public function offsetExists($offset)
258+
public function offsetExists($offset): bool
261259
{
262260
return isset($this->container[$offset]);
263261
}
@@ -269,7 +267,7 @@ public function offsetExists($offset)
269267
*
270268
* @return null|mixed
271269
*/
272-
public function offsetGet($offset)
270+
public function offsetGet($offset): mixed
273271
{
274272
return $this->container[$offset] ?? null;
275273
}
@@ -280,7 +278,7 @@ public function offsetGet($offset)
280278
* @param null|int $offset Offset
281279
* @param mixed $value Value to be set
282280
*/
283-
public function offsetSet($offset, $value)
281+
public function offsetSet($offset, $value): void
284282
{
285283
if (is_null($offset)) {
286284
$this->container[] = $value;
@@ -294,7 +292,7 @@ public function offsetSet($offset, $value)
294292
*
295293
* @param int $offset Offset
296294
*/
297-
public function offsetUnset($offset)
295+
public function offsetUnset($offset): void
298296
{
299297
unset($this->container[$offset]);
300298
}

clients/algoliasearch-client-php/lib/Model/Abtesting/AbTestsVariant.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,8 @@ public function setDescription($description)
265265
* Returns true if offset exists. False otherwise.
266266
*
267267
* @param int $offset Offset
268-
*
269-
* @return bool
270268
*/
271-
public function offsetExists($offset)
269+
public function offsetExists($offset): bool
272270
{
273271
return isset($this->container[$offset]);
274272
}
@@ -280,7 +278,7 @@ public function offsetExists($offset)
280278
*
281279
* @return null|mixed
282280
*/
283-
public function offsetGet($offset)
281+
public function offsetGet($offset): mixed
284282
{
285283
return $this->container[$offset] ?? null;
286284
}
@@ -291,7 +289,7 @@ public function offsetGet($offset)
291289
* @param null|int $offset Offset
292290
* @param mixed $value Value to be set
293291
*/
294-
public function offsetSet($offset, $value)
292+
public function offsetSet($offset, $value): void
295293
{
296294
if (is_null($offset)) {
297295
$this->container[] = $value;
@@ -305,7 +303,7 @@ public function offsetSet($offset, $value)
305303
*
306304
* @param int $offset Offset
307305
*/
308-
public function offsetUnset($offset)
306+
public function offsetUnset($offset): void
309307
{
310308
unset($this->container[$offset]);
311309
}

clients/algoliasearch-client-php/lib/Model/Abtesting/AbTestsVariantSearchParams.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,8 @@ public function setCustomSearchParameters($customSearchParameters)
301301
* Returns true if offset exists. False otherwise.
302302
*
303303
* @param int $offset Offset
304-
*
305-
* @return bool
306304
*/
307-
public function offsetExists($offset)
305+
public function offsetExists($offset): bool
308306
{
309307
return isset($this->container[$offset]);
310308
}
@@ -316,7 +314,7 @@ public function offsetExists($offset)
316314
*
317315
* @return null|mixed
318316
*/
319-
public function offsetGet($offset)
317+
public function offsetGet($offset): mixed
320318
{
321319
return $this->container[$offset] ?? null;
322320
}
@@ -327,7 +325,7 @@ public function offsetGet($offset)
327325
* @param null|int $offset Offset
328326
* @param mixed $value Value to be set
329327
*/
330-
public function offsetSet($offset, $value)
328+
public function offsetSet($offset, $value): void
331329
{
332330
if (is_null($offset)) {
333331
$this->container[] = $value;
@@ -341,7 +339,7 @@ public function offsetSet($offset, $value)
341339
*
342340
* @param int $offset Offset
343341
*/
344-
public function offsetUnset($offset)
342+
public function offsetUnset($offset): void
345343
{
346344
unset($this->container[$offset]);
347345
}

clients/algoliasearch-client-php/lib/Model/Abtesting/AddABTestsRequest.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,8 @@ public function setEndAt($endAt)
268268
* Returns true if offset exists. False otherwise.
269269
*
270270
* @param int $offset Offset
271-
*
272-
* @return bool
273271
*/
274-
public function offsetExists($offset)
272+
public function offsetExists($offset): bool
275273
{
276274
return isset($this->container[$offset]);
277275
}
@@ -283,7 +281,7 @@ public function offsetExists($offset)
283281
*
284282
* @return null|mixed
285283
*/
286-
public function offsetGet($offset)
284+
public function offsetGet($offset): mixed
287285
{
288286
return $this->container[$offset] ?? null;
289287
}
@@ -294,7 +292,7 @@ public function offsetGet($offset)
294292
* @param null|int $offset Offset
295293
* @param mixed $value Value to be set
296294
*/
297-
public function offsetSet($offset, $value)
295+
public function offsetSet($offset, $value): void
298296
{
299297
if (is_null($offset)) {
300298
$this->container[] = $value;
@@ -308,7 +306,7 @@ public function offsetSet($offset, $value)
308306
*
309307
* @param int $offset Offset
310308
*/
311-
public function offsetUnset($offset)
309+
public function offsetUnset($offset): void
312310
{
313311
unset($this->container[$offset]);
314312
}

clients/algoliasearch-client-php/lib/Model/Abtesting/AddABTestsVariant.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,8 @@ public function setCustomSearchParameters($customSearchParameters)
301301
* Returns true if offset exists. False otherwise.
302302
*
303303
* @param int $offset Offset
304-
*
305-
* @return bool
306304
*/
307-
public function offsetExists($offset)
305+
public function offsetExists($offset): bool
308306
{
309307
return isset($this->container[$offset]);
310308
}
@@ -316,7 +314,7 @@ public function offsetExists($offset)
316314
*
317315
* @return null|mixed
318316
*/
319-
public function offsetGet($offset)
317+
public function offsetGet($offset): mixed
320318
{
321319
return $this->container[$offset] ?? null;
322320
}
@@ -327,7 +325,7 @@ public function offsetGet($offset)
327325
* @param null|int $offset Offset
328326
* @param mixed $value Value to be set
329327
*/
330-
public function offsetSet($offset, $value)
328+
public function offsetSet($offset, $value): void
331329
{
332330
if (is_null($offset)) {
333331
$this->container[] = $value;
@@ -341,7 +339,7 @@ public function offsetSet($offset, $value)
341339
*
342340
* @param int $offset Offset
343341
*/
344-
public function offsetUnset($offset)
342+
public function offsetUnset($offset): void
345343
{
346344
unset($this->container[$offset]);
347345
}

clients/algoliasearch-client-php/lib/Model/Abtesting/Currency.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,8 @@ public function setStandardDeviation($standardDeviation)
274274
* Returns true if offset exists. False otherwise.
275275
*
276276
* @param int $offset Offset
277-
*
278-
* @return bool
279277
*/
280-
public function offsetExists($offset)
278+
public function offsetExists($offset): bool
281279
{
282280
return isset($this->container[$offset]);
283281
}
@@ -289,7 +287,7 @@ public function offsetExists($offset)
289287
*
290288
* @return null|mixed
291289
*/
292-
public function offsetGet($offset)
290+
public function offsetGet($offset): mixed
293291
{
294292
return $this->container[$offset] ?? null;
295293
}
@@ -300,7 +298,7 @@ public function offsetGet($offset)
300298
* @param null|int $offset Offset
301299
* @param mixed $value Value to be set
302300
*/
303-
public function offsetSet($offset, $value)
301+
public function offsetSet($offset, $value): void
304302
{
305303
if (is_null($offset)) {
306304
$this->container[] = $value;
@@ -314,7 +312,7 @@ public function offsetSet($offset, $value)
314312
*
315313
* @param int $offset Offset
316314
*/
317-
public function offsetUnset($offset)
315+
public function offsetUnset($offset): void
318316
{
319317
unset($this->container[$offset]);
320318
}

clients/algoliasearch-client-php/lib/Model/Abtesting/EmptySearch.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,8 @@ public function setExclude($exclude)
180180
* Returns true if offset exists. False otherwise.
181181
*
182182
* @param int $offset Offset
183-
*
184-
* @return bool
185183
*/
186-
public function offsetExists($offset)
184+
public function offsetExists($offset): bool
187185
{
188186
return isset($this->container[$offset]);
189187
}
@@ -195,7 +193,7 @@ public function offsetExists($offset)
195193
*
196194
* @return null|mixed
197195
*/
198-
public function offsetGet($offset)
196+
public function offsetGet($offset): mixed
199197
{
200198
return $this->container[$offset] ?? null;
201199
}
@@ -206,7 +204,7 @@ public function offsetGet($offset)
206204
* @param null|int $offset Offset
207205
* @param mixed $value Value to be set
208206
*/
209-
public function offsetSet($offset, $value)
207+
public function offsetSet($offset, $value): void
210208
{
211209
if (is_null($offset)) {
212210
$this->container[] = $value;
@@ -220,7 +218,7 @@ public function offsetSet($offset, $value)
220218
*
221219
* @param int $offset Offset
222220
*/
223-
public function offsetUnset($offset)
221+
public function offsetUnset($offset): void
224222
{
225223
unset($this->container[$offset]);
226224
}

clients/algoliasearch-client-php/lib/Model/Abtesting/EmptySearchFilter.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,8 @@ public function setTrackedSearchesCount($trackedSearchesCount)
212212
* Returns true if offset exists. False otherwise.
213213
*
214214
* @param int $offset Offset
215-
*
216-
* @return bool
217215
*/
218-
public function offsetExists($offset)
216+
public function offsetExists($offset): bool
219217
{
220218
return isset($this->container[$offset]);
221219
}
@@ -227,7 +225,7 @@ public function offsetExists($offset)
227225
*
228226
* @return null|mixed
229227
*/
230-
public function offsetGet($offset)
228+
public function offsetGet($offset): mixed
231229
{
232230
return $this->container[$offset] ?? null;
233231
}
@@ -238,7 +236,7 @@ public function offsetGet($offset)
238236
* @param null|int $offset Offset
239237
* @param mixed $value Value to be set
240238
*/
241-
public function offsetSet($offset, $value)
239+
public function offsetSet($offset, $value): void
242240
{
243241
if (is_null($offset)) {
244242
$this->container[] = $value;
@@ -252,7 +250,7 @@ public function offsetSet($offset, $value)
252250
*
253251
* @param int $offset Offset
254252
*/
255-
public function offsetUnset($offset)
253+
public function offsetUnset($offset): void
256254
{
257255
unset($this->container[$offset]);
258256
}

0 commit comments

Comments
 (0)