Total Complexity | 3 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class Response implements JsonSerializable |
||
9 | { |
||
10 | protected bool $status = true; |
||
11 | protected array $error = []; |
||
12 | protected $result; |
||
13 | private string $label; |
||
14 | |||
15 | /** |
||
16 | * Response constructor. |
||
17 | * @param string $label |
||
18 | * @param bool $status |
||
19 | * @param mixed $result |
||
20 | * @param array $error |
||
21 | */ |
||
22 | public function __construct(string $label, bool $status, $result, array $error = []) |
||
28 | } |
||
29 | |||
30 | public function jsonSerialize() |
||
37 | ]; |
||
38 | } |
||
39 | |||
40 | public function toArray() |
||
45 |