HydraPaginatedCollection::getNextPage()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 1
cts 1
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Mapado\RestClientSdk\Collection;
6
7
/**
8
 * Class HydraPaginatedCollection
9
 *
10
 * @author Florent Clerc <[email protected]>
11
 */
12
class HydraPaginatedCollection extends Collection
13
{
14
    /**
15
     * Returns first page URI.
16
     */
17
    public function getFirstPage(): ?string
18
    {
19 1
        return $this->getExtraProperty('hydra:firstPage');
20
    }
21
22
    /**
23
     * Returns last page URI.
24
     */
25
    public function getLastPage(): ?string
26
    {
27 1
        return $this->getExtraProperty('hydra:lastPage');
28
    }
29
30
    /**
31
     * Returns next page URI.
32
     */
33
    public function getNextPage(): ?string
34
    {
35 1
        return $this->getExtraProperty('hydra:nextPage');
36
    }
37
38
    /**
39
     * Returns total item count.
40
     */
41
    public function getTotalItems(): int
42
    {
43 1
        return $this->getExtraProperty('hydra:totalItems') ?? 0;
44
    }
45
}
46