PluginProbe
Metricool – Social media and site statistics / trunk
Metricool – Social media and site statistics vtrunk
2.1.0 2.0.2 2.0.1 2.0.0 1.27 trunk
metricool / app / Exceptions / RestDataException.php

RestDataException.php in Metricool – Social media and site statistics trunk, at app/Exceptions/RestDataException.php

34 lines 610 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Metricool\Exceptions;
6
7 class RestDataException extends \Exception
8 {
9 protected array $data = [];
10 protected int $statusCode = 400;
11
12 public function setResponseCode(int $code): RestDataException
13 {
14 $this->statusCode = $code;
15 return $this;
16 }
17
18 public function getResponseCode(): int
19 {
20 return $this->statusCode;
21 }
22
23 public function setData(array $data): RestDataException
24 {
25 $this->data = $data;
26 return $this;
27 }
28
29 public function getData(): array
30 {
31 return $this->data;
32 }
33 }
34