Passed
Push — master ( 8af3ec...4c67f7 )
by Derek Stephen
01:43
created

ApiCollection::getTotalPages()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Bone\BoneDoctrine\Collection;
6
7
use Doctrine\Common\Collections\ArrayCollection;
8
use Psr\Http\Message\UriInterface;
9
10
class ApiCollection extends ArrayCollection
11
{
12
    private int $page;
13
    private int $totalPages;
14
    private UriInterface $uri;
15
16
    public function __construct(array $elements = [], UriInterface $uri, int $page, int $totalPages)
17
    {
18
        parent::__construct($elements);
19
        $this->page = $page;
20
        $this->totalPages = $totalPages;
21
        $this->uri = $uri;
22
    }
23
24
    public function getTotalPages(): int
25
    {
26
        return $this->totalPages;
27
    }
28
29
    public function getUri(): UriInterface
30
    {
31
        return $this->uri;
32
    }
33
34
    public function getPage(): int
35
    {
36
        return $this->page;
37
    }
38
}
39