Skip to content

Commit 675fc78

Browse files
fix(php): Deprecation warning fix for PHP 8.1+ (#3562)
Co-authored-by: shortcuts <[email protected]>
1 parent f73cb83 commit 675fc78

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

templates/php/model_generic.mustache

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ class {{classname}} extends \Algolia\AlgoliaSearch\Model\AbstractModel {{^parent
346346
*
347347
* @return boolean
348348
*/
349-
public function offsetExists($offset)
349+
public function offsetExists($offset): bool
350350
{
351351
return isset($this->container[$offset]);
352352
}
@@ -358,7 +358,7 @@ class {{classname}} extends \Algolia\AlgoliaSearch\Model\AbstractModel {{^parent
358358
*
359359
* @return mixed|null
360360
*/
361-
public function offsetGet($offset)
361+
public function offsetGet($offset): mixed
362362
{
363363
return $this->container[$offset] ?? null;
364364
}
@@ -371,7 +371,7 @@ class {{classname}} extends \Algolia\AlgoliaSearch\Model\AbstractModel {{^parent
371371
*
372372
* @return void
373373
*/
374-
public function offsetSet($offset, $value)
374+
public function offsetSet($offset, $value): void
375375
{
376376
if (is_null($offset)) {
377377
$this->container[] = $value;
@@ -387,7 +387,7 @@ class {{classname}} extends \Algolia\AlgoliaSearch\Model\AbstractModel {{^parent
387387
*
388388
* @return void
389389
*/
390-
public function offsetUnset($offset)
390+
public function offsetUnset($offset): void
391391
{
392392
unset($this->container[$offset]);
393393
}

0 commit comments

Comments
 (0)