PaginatedResults   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 51
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getResults() 0 4 1
A getCurrentPage() 0 4 1
A getMaxPages() 0 4 1
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
}