Skip to content

Commit

Permalink
php-kafka#33 Fix all auto-tests: Fix deprecation warning for the PhpC…
Browse files Browse the repository at this point in the history
…lassPropertyTypeItem::jsonSerialize in tests
  • Loading branch information
Pavel Alexeev authored and Pavel Alexeev committed Jan 9, 2022
1 parent b10a949 commit 377ddf5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/PhpClass/PhpClassPropertyType.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ public function isNullable(): bool
return (bool)current(array_filter($this->types, function ($type) { return !$type->isArray() && 'null' == $type->getItemType(); }));
}

public function jsonSerialize(): mixed
/**
* Allow easy serialization into JSON
* @return array|mixed|PhpClassPropertyTypeItemInterface|PhpClassPropertyTypeItemInterface[]
*/
public function jsonSerialize()
{
if (0 == count($this->types)){
return [];
Expand Down

0 comments on commit 377ddf5

Please sign in to comment.