Total Complexity | 7 |
Total Lines | 66 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
4 | class PaginationLinks |
||
5 | { |
||
6 | /** @var string */ |
||
7 | private $first; |
||
8 | /** @var string */ |
||
9 | private $last; |
||
10 | /** @var string */ |
||
11 | private $next; |
||
12 | /** @var string */ |
||
13 | private $prev; |
||
14 | |||
15 | /** |
||
16 | * PaginationLinks constructor. |
||
17 | * @param string $first |
||
18 | * @param string $last |
||
19 | * @param string $next |
||
20 | * @param string $prev |
||
21 | */ |
||
22 | 4 | public function __construct($first, $last, $next = null, $prev = null) |
|
23 | { |
||
24 | 4 | $this->first = $first; |
|
25 | 4 | $this->last = $last; |
|
26 | 4 | $this->next = $next; |
|
27 | 4 | $this->prev = $prev; |
|
28 | 4 | } |
|
29 | |||
30 | /** |
||
31 | * @return string |
||
32 | */ |
||
33 | 3 | public function getFirst() |
|
36 | } |
||
37 | |||
38 | 3 | public function hasNext() |
|
39 | { |
||
40 | 3 | return ($this->next !== null); |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * @return string |
||
45 | */ |
||
46 | 2 | public function getNext() |
|
47 | { |
||
48 | 2 | return $this->next; |
|
49 | } |
||
50 | |||
51 | 3 | public function hasPrev() |
|
52 | { |
||
53 | 3 | return ($this->prev !== null); |
|
54 | } |
||
55 | |||
56 | /** |
||
57 | * @return string |
||
58 | */ |
||
59 | 2 | public function getPrev() |
|
62 | } |
||
63 | |||
64 | /** |
||
65 | * @return string |
||
66 | */ |
||
67 | 3 | public function getLast() |
|
70 | } |
||
71 | } |
||
72 |