Skip to content

Commit 73a2545

Browse files
algolia-botaykutersoymillotp
committed
fix(php): native return types for AbstractModel methods (generated)
algolia/api-clients-automation#3563 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Aykut Ersoy <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 1d085c1 commit 73a2545

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

lib/Model/AbstractModel.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ abstract class AbstractModel
1313
{
1414
/**
1515
* Gets the string presentation of the object.
16-
*
17-
* @return string
1816
*/
19-
public function __toString()
17+
public function __toString(): string
2018
{
2119
return json_encode(
2220
ObjectSerializer::sanitizeForSerialization($this),
@@ -32,17 +30,15 @@ public function __toString()
3230
* @return mixed returns data which can be serialized by json_encode(), which is a value
3331
* of any type other than a resource
3432
*/
35-
public function jsonSerialize()
33+
public function jsonSerialize(): mixed
3634
{
3735
return ObjectSerializer::sanitizeForSerialization($this);
3836
}
3937

4038
/**
4139
* Gets a header-safe presentation of the object.
42-
*
43-
* @return string
4440
*/
45-
public function toHeaderValue()
41+
public function toHeaderValue(): string
4642
{
4743
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
4844
}

0 commit comments

Comments
 (0)