# metricool/trunk/app/Exceptions/RestDataException.php

Metricool – Social media and site statistics, version trunk. 34 lines.

- Page: https://pluginprobe.com/plugins/metricool/trunk/code/app/Exceptions/RestDataException.php
- Raw: https://pluginprobe.com/plugins/metricool/trunk/raw/app/Exceptions/RestDataException.php
- Modified: 2026-08-20T14:08:30+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/metricool/trunk/code/app/Exceptions/RestDataException.php#L10-L20`.

```php
<?php

declare(strict_types=1);

namespace Metricool\Exceptions;

class RestDataException extends \Exception
{
    protected array $data = [];
    protected int $statusCode = 400;

    public function setResponseCode(int $code): RestDataException
    {
        $this->statusCode = $code;
        return $this;
    }

    public function getResponseCode(): int
    {
        return $this->statusCode;
    }

    public function setData(array $data): RestDataException
    {
        $this->data = $data;
        return $this;
    }

    public function getData(): array
    {
        return $this->data;
    }
}

```
