Return web service serialisable data

@return array
165012
public function returnWebServiceSerialisableData(){

        $serialisableMap = $this->__getSerialisablePropertyMap();

        unset($serialisableMap["trace"]);
        unset($serialisableMap["file"]);
        unset($serialisableMap["line"]);
        unset($serialisableMap["traceAsString"]);
        unset($serialisableMap["previous"]);
        $serialisableMap["code"] = $this->getSourceException() ? $this->getSourceException()["code"] : $this->getCode();
        $serialisableMap["message"] = $this->getSourceException() ? $this->getSourceException()["message"] : $this->getMessage();
        unset($serialisableMap["sourceException"]);

        return $serialisableMap;

    }
1043555
public function serialize(){

		@mysqli_close($this->_connection);

		$data = [
			$this->_server,
			$this->_username,
			$this->_password,
			$this->_database
		];

		return serialize($data);
	}
757244
public function jsonSerialize()
    {
        $copy = [];
        foreach ((array)$this as $key => $value) {
            if (!is_string($value)) {
                $element = $value->getElement();
                if (is_object($element)
                    and method_exists($element, 'name')
                    and $name = $element->name()
                ) {
                    $copy[$name] = $value instanceof JsonSerializable ? $value->jsonSerialize() : $value;
                }
                $copy[$key] = $value instanceof JsonSerializable ? $value->jsonSerialize() : $value;
            } else {
                $copy[$key] = $value;
            }
        }
        return $copy;
    }
738012
public function toArray()
	{
		return [
			'name' => (string) $this->name,
			'email' => SerializationHelper::serialize($this->email),
			'links' => SerializationHelper::serialize($this->links)
		];
	}
485484
public function jsonSerialize()
    {
        return [
            'message'     => CustomAmqpMessage::getMessageProperties($this->message),
            'tag'         => $this->tag,
            'exchange'    => $this->exchange,
            'queue'       => $this->queue,
            'routingKey'  => $this->routingKey,
            'redelivered' => $this->redelivered,
        ];
    }
840621
public function jsonSerialize()
    {
        return array_map(function($value)
        {
            if($value instanceof JsonSerialize)
                return $value->jsonSerialize();
            elseif($value instanceof  JsonInterface)
                return json_decode($value->toJson(), true);
            elseif($value instanceof ArrayInterface)
                return $value->toArray();
            else
                return $value;

        }, $this->attributes);
    }
572991
public function getData()
    {
        $this->validate(
            'partner',
            'notify_id'
        );

        $data            = $this->parameters->all();
        $data['service'] = $this->service;

        return $data;
    }
1198589
protected function get_data_to_serialize() {
		return array(
			'recipient'    => $this->recipient->ID,
			'message'      => $this->message,
			'subject'      => $this->subject,
			'strategy'     => $this->strategy,
			'manager'      => $this->manager->get_type(),
			'data_sources' => $this->data_sources
		);
	}
1023468
public function jsonSerialize()
    {
        return array_map(function ($value) {
            if ($value instanceof JsonSerializable) {
                return $value->jsonSerialize();
            } else {
                return $value;
            }
        }, $this->items);
    }
1135865
public function serialize(): array {
        // base 64 encode
        $details = array_map(function($value) {
            return base64_encode($value);
        }, $this->details);

        // enrich with encryption type
        return $details + ['encryption' => $this->encryption];
    }
990324
public function jsonSerialize() {
        list($query_data, $meta) = $this->constructQuery($this->source, $this->query, $this->aggs, $this->post_query, $this->settings);

        return $query_data;
    }
596657
public function jsonSerialize()
    {
        $data = [];

        foreach ($this as $element) {
            if ($element instanceof \JsonSerializable) {
                $data[] = $element->jsonSerialize();
            }
        }

        return $data;
    }
60911
public function serialize()
    {
        $result = array();
        foreach ($this->getKeys() as $k => $v) {
            $result[] = $k . ': ' . $v;
        }
        foreach ($this->getVariables() as $k => $v) {
            if (is_array($v)) {
                foreach ($v as $singleValue) {
                    $result[] = $this->serializeVariable($k, $singleValue);
                }
            } else {
                $result[] = $this->serializeVariable($k, $v);
            }
        }
        $mStr = $this->finishMessage(implode(self::EOL, $result));
        return $mStr;
    }
829360
public function jsonSerialize()
    {
        return array(
            'type' => $this->getType(),
            'bodyText' => $this->getBodyText(),
            'bodyHtml' => $this->getBodyHtml(),
            'recipients' => $this->getRecipients(),
            'from'    => $this->getFrom(),
            'subject' => $this->getSubject(),
            'text'    => quoted_printable_decode($this->getBodyText(true)),
            'html'    => quoted_printable_decode($this->getBodyHtml(true))
        );
    }
164177
public function jsonSerialize()
    {
        $parameters = [];

        if ($this->accessToken) {
            $parameters['access_token'] = $this->accessToken;
        }

        if ($this->userId) {
            $parameters['user_id'] = $this->userId;
        }

        if ($this->entityId) {
            $parameters['entity_id'] = $this->entityId;
        }

        if ($this->expires) {
            $parameters['expires'] = $this->expires;
        }

        return $parameters;
    }
456213
public function getData()
    {
        $result = [
            'type' => $this->type
        ];

        switch($this->type)
        {

            case self::TYPE_WEB:
              $result['url'] = $this->url;

              if ($this->webview_height_ratio) {
                  $result['webview_height_ratio'] = $this->webview_height_ratio;
              }

              if ($this->messenger_extensions){
                  $result['messenger_extensions'] = $this->messenger_extensions;
                  $result['fallback_url'] = $this->fallback_url;
              }
            break;

        }

        return $result;
    }
1224189
public function jsonSerialize()
    {
        return array_filter(
            [
                'enable' => $this->getEnable(),
                'utm_source' => $this->getCampaignSource(),
                'utm_medium' => $this->getCampaignMedium(),
                'utm_term' => $this->getCampaignTerm(),
                'utm_content' => $this->getCampaignContent(),
                'utm_campaign' => $this->getCampaignName()
            ],
            function ($value) {
                return $value !== null;
            }
        ) ?: null;
    }