PaginatedResults::getResults()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace ComradeReader\Model\Entity;
4
5
class PaginatedResults
6
{
7
    /** @var array $results */
8
    private $results = [];
9
10
    /** @var int $currentPage */
11
    private $currentPage;
12
13
    /** @var int $maxPages */
14
    private $maxPages;
15
16
    /**
17
     * PaginatedResults constructor.
18
     *
19
     * @param array $results
20
     * @param int $currentPage
21
     * @param int $maxPages
22
     */
23
    public function __construct(array $results, $currentPage, $maxPages)
24
    {
25
        $this->results     = $results;
26
        $this->currentPage = $currentPage;
27
        $this->maxPages    = $maxPages;
28
    }
29
30
    /**
31
     * @return array
32
     */
33
    public function getResults()
34
    {
35
        return $this->results;
36
    }
37
38
    /**
39
     * @codeCoverageIgnore
40
     * @return int
41
     */
42
    public function getCurrentPage()
43
    {
44
        return $this->currentPage;
45
    }
46
47
    /**
48
     * @codeCoverageIgnore
49
     * @return int
50
     */
51
    public function getMaxPages()
52
    {
53
        return $this->maxPages;
54
    }
55
}