boosts; } /** * @inheritDoc */ public function toArray(): ?array { return [ 'boosts' => array_map(fn(ChatBoost $item) => $item->toArray(), $this->boosts) ]; } /** * @inheritDoc */ public static function fromArray(?array $data): ?UserChatBoosts { if($data === null) { return null; } $object = new self(); $object->boosts = array_map(fn(array $item) => ChatBoost::fromArray($item), $data['boosts']); return $object; } }