Conditions | 4 |
Paths | 4 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
54 | 1 | public function __construct($data = [], $result = false, $total = null, $pages = 1, $message = null) |
|
55 | { |
||
56 | 1 | parent::__construct(false); |
|
57 | 1 | $this->data = $this->parseData($data); |
|
58 | 1 | $this->success = $result; |
|
59 | 1 | $this->total = $total ?: (is_array($this->data) ? count($this->data) : ($total ?? 0)); |
|
|
|||
60 | 1 | $this->pages = $pages; |
|
61 | 1 | if (null !== $message) { |
|
62 | 1 | $this->message = $message; |
|
63 | } |
||
66 |