diff --git a/src/PhpClass/PhpClassPropertyType.php b/src/PhpClass/PhpClassPropertyType.php index 1dea4f9..235bce3 100644 --- a/src/PhpClass/PhpClassPropertyType.php +++ b/src/PhpClass/PhpClassPropertyType.php @@ -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 [];