Skip to content

Commit 377ddf5

Browse files
Pavel AlexeevPavel Alexeev
Pavel Alexeev
authored and
Pavel Alexeev
committed
php-kafka#33 Fix all auto-tests: Fix deprecation warning for the PhpClassPropertyTypeItem::jsonSerialize in tests
1 parent b10a949 commit 377ddf5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/PhpClass/PhpClassPropertyType.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ public function isNullable(): bool
3030
return (bool)current(array_filter($this->types, function ($type) { return !$type->isArray() && 'null' == $type->getItemType(); }));
3131
}
3232

33-
public function jsonSerialize(): mixed
33+
/**
34+
* Allow easy serialization into JSON
35+
* @return array|mixed|PhpClassPropertyTypeItemInterface|PhpClassPropertyTypeItemInterface[]
36+
*/
37+
public function jsonSerialize()
3438
{
3539
if (0 == count($this->types)){
3640
return [];

0 commit comments

Comments
 (0)