To array for send api

@return array
184162
public function toData()
    {
        $payload = (new GenericTransformer)->transform($this);
        $this->setPayload($payload);

        return parent::toData();
    }
711199
public function toArray()
    {
        return [
            'level' => $this->level,
            'subject' => $this->subject,
            'greeting' => $this->greeting,
            'salutation' => $this->salutation,
            'introLines' => $this->introLines,
            'outroLines' => $this->outroLines,
            'actionText' => $this->actionText,
            'actionUrl' => $this->actionUrl,
        ];
    }
640600
public function toArray()
    {
        return array(
            'scheme' => $this->scheme->get(),
            'user' => $this->user->get(),
            'pass' => $this->pass->get(),
            'host' => $this->host->get(),
            'port' => $this->port->get(),
            'path' => $this->path->get(),
            'query' => $this->query->get(),
            'fragment' => $this->fragment->get(),
        );
    }
1145401
public function toArray()
    {
        return [
            'openId'        => $this->openId,
            'unionId'       => $this->unionId,
            'nickName'      => $this->nickName,

            'sex'           => $this->sex->getValue(),
            'city'          => $this->city,
            'province'      => $this->province,
            'country'       => $this->country,
            'headImgUrl'    => $this->headImgUrl,

            'subscribe'     => $this->subscribe->getValue(),
            'subscribeTime' => $this->subscribeTime,
            'groupId'       => $this->groupId,
        ];
    }
1075686
public function toArray(): array
    {
        $problem = [
            'status'   => $this->getStatusCode(),
            'title'    => $this->getTitle(),
            'detail'   => $this->getDetail(),
            'type'     => $this->getType(),
            'instance' => $this->getInstance(),
        ];

        // Required fields should always overwrite additional fields
        // Use array_filter to remove empty fields in the default fields
        // And don't array_filter $additionalData in case there is a bool = false value
        return $this->mergeArrays(array_filter($problem), $this->additionalData);
    }
791079
public function toArray()
    {
        return [
            'severity' => $this->severity,
            'msg' => $this->msg,
            'hint' => $this->hint,
            'link' => !empty($this->link) ? $this->link : null,
            'iconCls' => $this->iconClass,
        ];
    }
157857
public function toArray()
    {
        return [
            [
                'endpoint' => $this->endpoint->toArray(),
                'timestamp' => $this->startTimestamp,
                'value' => $this->values[0]
            ],
            [
                'endpoint' => $this->endpoint->toArray(),
                'timestamp' => $this->endTimestamp,
                'value' => $this->values[1]
            ]
        ];
    }
1231663
public function toArray(): array
    {
        return [
            'scheme'    => $this->scheme,
            'authority' => $this->authority,
            'path'      => $this->path,
            'query'     => $this->query,
            'fragment'  => $this->fragment
        ];
    }
1260724
public function __toArray()
    {
        return array(
            'subject' => $this->getSubject(),
            'from' => $this->getFrom(),
            'to' => $this->getTo(),
            'createdat' => $this->getCreatedAt(),
            'in_reply_to' => $this->getInReplyTo() ? $this->getInReplyTo()->getMessageId() : null,
            'message_type' => (string)$this->getMessageType(),
            'body' => $this->getBody(),
        );
    }
401188
public function toArray()
    {
        $this->title($this->title);
        $this->makePayload($this->data);

        return $this->payload;
    }
622589
public function toData()
    {
        switch ($this->type) {
            case self::TYPE_SHARE:
                return array_merge([
                    'type' => $this->type,
                ], $this->extra);
            case self::TYPE_ACCOUNT_LINK:
                return [
                    'type' => $this->type,
                    'url' => $this->payload,
                ];
            default:
                return [
                    'type' => $this->type,
                    'title' => $this->title,
                ] + $this->makePayload();
        }
    }
208516
public function toArray()
    {
        return array_merge($this->wrappedObject->toArray(), [
            'human_status'        => $this->human_status(),
            'latest_update_id'    => $this->latest() ? $this->latest()->id : null,
            'latest_status'       => $this->latest_status(),
            'latest_human_status' => $this->latest_human_status(),
            'latest_icon'         => $this->latest_icon(),
            'permalink'           => $this->permalink(),
            'duration'            => $this->duration(),
            'meta'                => $this->meta(),
            'occurred_at'         => $this->occurred_at(),
            'created_at'          => $this->created_at(),
            'updated_at'          => $this->updated_at(),
        ]);
    }
271996
public function send()
    {
        if (!$this->auth_code) {
            $this->getAuthCode();
        }

        return [
            'redirect'             => $this->redirect,
            'transactionReference' => $this->transactionReference,
            'auth_code'            => $this->auth_code,
        ];
    }
860078
public function toArray()
    {
        return [
            'id' => $this->id,
            'author_name' => $this->authorName,
            'author_email' => $this->authorEmail,
            'committer_name' => $this->committerName,
            'committer_email' => $this->committerEmail,
            'message' => $this->message,
        ];
    }
1336289
public function toArray() : array
    {
        $output = [];
        foreach ($this->data as $key => $val) {
            $output[$key] = $val instanceof ArraySerializable ? $val->toArray() : $val;
        }
        return $output;
    }
552711
public function toSoapRequestArray(): array
	{
		$configArray = $this->configArray();
		$data = parent::toArray();
		$withConfig = array_merge($configArray, $data);

		return DateTimeDeflater::processWithPaths(
			$withConfig,
			static::$dateTimePaths
		);
	}
878803
public function toArray()
    {
        return array(
            'email' => $this->getEmail(),
            'telno' => $this->getTelno(),
            'cellno' => $this->getCellno(),
            'fname' => $this->getFirstName(),
            'lname' => $this->getLastName(),
            'company' => $this->getCompanyName(),
            'careof' => $this->getCareof(),
            'street' => $this->getStreet(),
            'house_number' => $this->getHouseNumber(),
            'house_extension' => $this->getHouseExt(),
            'zip' => $this->getZipCode(),
            'city' => $this->getCity(),
            'country' => $this->getCountry(),
        );
    }