PaginationLinks::getFirst()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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