Format exception as array.

@return array
192604
public function toArray()
    {
        $hasChainedException = PHP_VERSION_ID >= 50300;

        $exception = $this->exception;

        do {
            $whoops = $this->getWhoopsRunner();
            $whoops->pushHandler(new WhoopsHandler($this->config))->register();

            $exceptions[] = json_decode(
                $whoops->handleException($exception),
                true
            );
        } while ($hasChainedException && $exception = $exception->getPrevious());

        $data = [
            'title' => get_class($this->exception),
            'message' => $this->exception->getMessage(),
            'exception' => [
                'file' => $this->exception->getFile(),
                'line' => $this->exception->getLine(),
                'code' => $this->exception->getCode(),
            ],
            'platform' => 'php',
            'environment' => $this->config->getEnvironment(),
            'events' => [
                'exceptions' => $exceptions,
                'meta_data' => $this->config->getMetaData(),
                'user' => $this->config->getUser(),
                'sdk' => $this->config->getSdk(),
            ],
        ];

        if (empty($data['level'])) {
            if (method_exists($exception, 'getSeverity')) {
                $data['level'] = $this->translateSeverity($exception->getSeverity());
            } else {
                $data['level'] = self::ERROR;
            }
        }

        return $data;
    }
1126217
public function toArray(): array
    {
        $payload = [
            'code' => $this->getCode()
        ];

        if (! empty($this->getMessage())) {
            $payload['message'] = $this->getMessage();
        }

        if (! empty($this->getError())) {
            $payload['error'] = $this->getError();
        }

        if (! empty($this->getData())) {
            $payload['data'] = $this->getData();
        }

        if (! empty($this->getOptions())) {
            $payload += $this->getOptions();
        }

        return $payload;
    }
849168
public function toArray(): array
    {
        $result = $this->orgData;
        foreach ($this->addAttributes as $key => $value) {
            $result[$key] = $value;
        }
        foreach ($this->updateAttributes as $key => $value) {
            $result[$key] = $value;
        }
        foreach ($this->removeAttributes as $key => $value) {
            unset($result[$key]);
        }
        return $result;
    }
952319
public function toArray()
	{
		return [
			'points' => SerializationHelper::serialize($this->points),
			'extensions' => SerializationHelper::serialize($this->extensions),
			'stats' => SerializationHelper::serialize($this->stats)
		];
	}
785755
public function toArray()
    {
        $this->dataType('array');
        
        $this->execute();
        
        if ($this->def['savePath']) {
            return $this->save();
        } elseif ($this->def['verbose']) {
            return $this->getVerboseResponse();
        }
        
        return $this->getError() ? : json_decode($this->responseText, true);
    }
706599
public static function formatError(Error $exception)
    {
        $error = [
            'message' => $exception->getMessage(),
        ];

        $locations = $exception->getLocations();
        if (!empty($locations)) {
            $error['locations'] = array_map(function (SourceLocation $loc) {
                return $loc->toArray();
            }, $locations);
        }

        $previous = $exception->getPrevious();
        if ($previous && $previous instanceof ValidationException) {
            $error['validation'] = $previous->getResult()->getMessages();
        }

        return $error;
    }
1114422
public function toArray(): array
    {
        $data = ReflectionUtil::objToSnakeArray($this, static::blacklist());
        foreach ($this->renamed as $name => $newName) {
            if (!array_key_exists($name, $data)) {
                continue;
            }
            $data[$newName] = $data[$name];
            unset($data[$name]);
        }

        return $data;
    }
875011
public function getFormatters(): ArrayObject
    {
        $arr = new ArrayObject();
        foreach ($this->columns as $key => $column) {
            if (($formatter = $column->getFormatter()) !== null) {
                $arr->offsetSet($key, $formatter);
            }
        }

        return $arr;
    }
1346790
public function getExceptions(): array
    {
        $exceptions = [];

        foreach ($this->exceptions as $request) {
            $exceptions[] = $this->exceptions[$request];
        }

        return $exceptions;
    }
683296
public function toArray()
    {
        $array = [];

        $array['alias']    = $this->getAlias();
        $array['property'] = $this->getProperty();
        $array['field']    = $this->getField();

        if (!empty($this->getType())) {
            $array['type'] = $this->getType();
        }

        $array['behavior'] = $this->getBehavior()->toArray();

        if (!empty($this->getFormat())) {
            $format = [];
            foreach ($this->getFormat() as $item) {
                $format[] = $item->toArray();
            }
            $array['format'] = $format;
        }

        if (!empty($this->getAllowedValues())) {
            $array['allowedValues'] = $this->getAllowedValues();
        }

        if (!empty($this->getComposition())) {
            $array['composition'] = $this->getComposition()->toArray();
        }

        if (!empty($this->getDefault())) {
            $array['default'] = $this->getDefault();
        }

        return $array;
    }
879897
public function toArray()
    {
        $data = array();
        foreach ($this->violations as $violation) {
            $data[] = $violation->getMessage();
        }

        return $data;
    }
1336289
public function toArray() : array
    {
        $output = [];
        foreach ($this->data as $key => $val) {
            $output[$key] = $val instanceof ArraySerializable ? $val->toArray() : $val;
        }
        return $output;
    }
1140515
public function toArray()
    {
        $out = [];

        foreach ($this->setFields as $key) {
            $property = $this->{$key};

            if ($property instanceof DateTime) {
                $out[$key] = $property->format(DateTime::ISO8601);
            } else {
                $out[$key] = $property;
            }
        }

        return $out;
    }
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(),
        );
    }
1112407
public function toArray()
	{
		$array = array ();
		for ($i=$this->interval->getStart(); $i<$this->interval->getEnd(); $i++)
		{
			$value = $this->getValue ($i);
			$array [$i] = $value;
		}
		return $array;
	}
427522
public function toArray()
    {
        return [
            'name' => $this->getName(),
            'text' => $this->getText(),
            'style' => $this->getStyle(),
            'type' => $this->getType(),
            'value' => $this->getValue(),
            'confirm' => $this->getConfirm()->toArray(),
        ];
    }
829665
public function toArray()
    {
        return [
            'message' => $this->getMessageException(),
            'errors' => $this->getErrors(),
            'debugCode' => $this->getDebugCode(),
            'details' => $this->getDetails(),
            'routeBack' => redirect()->back()->getTargetUrl()
        ];
    }