Total Complexity | 6 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Coverage | 50% |
Changes | 0 |
1 | <?php |
||
7 | class ContentCollection |
||
8 | { |
||
9 | /** |
||
10 | * @var int |
||
11 | */ |
||
12 | protected $total; |
||
13 | |||
14 | /** |
||
15 | * @var object[] |
||
16 | */ |
||
17 | protected $data; |
||
18 | |||
19 | /** |
||
20 | * @var string|null |
||
21 | */ |
||
22 | protected $next; |
||
23 | |||
24 | /** |
||
25 | * @var string|null |
||
26 | */ |
||
27 | protected $offset; |
||
28 | |||
29 | 5 | public function __construct(array $data) |
|
30 | { |
||
31 | 5 | $this->normalize($data); |
|
32 | 5 | } |
|
33 | |||
34 | public function getTotal(): int |
||
35 | { |
||
36 | return $this->total; |
||
37 | } |
||
38 | |||
39 | public function getNext(): ?string |
||
40 | { |
||
41 | return $this->next; |
||
42 | } |
||
43 | |||
44 | public function getOffset(): ?string |
||
45 | { |
||
46 | return $this->offset; |
||
47 | } |
||
48 | |||
49 | public function getData() |
||
50 | { |
||
51 | return $this->data; |
||
52 | } |
||
53 | |||
54 | 5 | protected function normalize(array $data) |
|
60 | 5 | } |
|
61 | } |
||
62 |