PaginationLinks   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 66
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 15
dl 0
loc 66
ccs 18
cts 18
cp 1
rs 10
c 0
b 0
f 0
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getFirst() 0 3 1
A getPrev() 0 3 1
A getNext() 0 3 1
A hasPrev() 0 3 1
A __construct() 0 6 1
A getLast() 0 3 1
A hasNext() 0 3 1
1
<?php
2
namespace ElevenLabs\Api\Service\Pagination;
3
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()
34
    {
35 3
        return $this->first;
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()
60
    {
61 2
        return $this->prev;
62
    }
63
64
    /**
65
     * @return string
66
     */
67 3
    public function getLast()
68
    {
69 3
        return $this->last;
70
    }
71
}
72