<?php


namespace Mainto\RpcServer\Util;


use Illuminate\Contracts\Support\Arrayable;

/**
 * add toArray() for public property
 * Trait ArrayHelper
 * @package Mainto\RpcServer\Util
 */
trait ArrayHelper {
    public function toArray (): array {
        return to_array(get_object_public_vars($this));
    }
}