Total Complexity | 4 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
4 | class JsonResponse extends Dto |
||
5 | { |
||
6 | /** |
||
7 | * Response message |
||
8 | * @var string $message |
||
9 | */ |
||
10 | public $message = 'No message'; |
||
11 | /** |
||
12 | * Response result |
||
13 | * @var bool $success |
||
14 | */ |
||
15 | public $success = false; |
||
16 | /** |
||
17 | * Data of response |
||
18 | * @var array $data |
||
19 | */ |
||
20 | public $data = null; |
||
21 | /** |
||
22 | * Number of total results |
||
23 | * @var int total |
||
24 | */ |
||
25 | public $total = 0; |
||
26 | /** |
||
27 | * Number of pages availables |
||
28 | * @var int pages |
||
29 | */ |
||
30 | public $pages = 1; |
||
31 | |||
32 | /** |
||
33 | * JsonResponse constructor. |
||
34 | * @param array $data |
||
35 | * @param bool $result |
||
36 | * @param null $total |
||
|
|||
37 | * @param int $pages |
||
38 | * @param null $message |
||
39 | * @throws \PSFS\base\exception\GeneratorException |
||
40 | */ |
||
41 | 1 | public function __construct($data = array(), $result = false, $total = null, $pages = 1, $message = null) |
|
52 | } |