Total Complexity | 3 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
22 | trait ListItems |
||
23 | { |
||
24 | /** |
||
25 | * Page number |
||
26 | * @var int |
||
27 | */ |
||
28 | public $page = 1; |
||
29 | /** |
||
30 | * Total pages |
||
31 | * @var int |
||
32 | */ |
||
33 | public $total_pages = 1; |
||
34 | /** |
||
35 | * Total results |
||
36 | * @var int |
||
37 | */ |
||
38 | public $total_results = 0; |
||
39 | |||
40 | /** |
||
41 | * Get page from result search |
||
42 | * @return int |
||
43 | */ |
||
44 | 6 | public function getPage() : int |
|
45 | { |
||
46 | 6 | return $this->page; |
|
47 | } |
||
48 | |||
49 | /** |
||
50 | * Get total page from result search |
||
51 | * @return int |
||
52 | */ |
||
53 | 6 | public function getTotalPages() : int |
|
54 | { |
||
55 | 6 | return $this->total_pages; |
|
56 | } |
||
57 | |||
58 | /** |
||
59 | * Get total results from search |
||
60 | * @return int |
||
61 | */ |
||
62 | 6 | public function getTotalResults() : int |
|
65 | } |
||
66 | } |
||
67 |