Pager   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 84
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 84
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getCurrentPage() 0 4 1
A getPerPage() 0 4 1
A getCount() 0 4 1
A getPageCount() 0 4 1
A getResults() 0 4 1
1
<?php
2
3
namespace ReenExeCubeTime\LightPaginator;
4
5
class Pager implements PagerInterface
6
{
7
    /**
8
     * @var int
9
     */
10
    private $currentPage;
11
12
    /**
13
     * @var int
14
     */
15
    private $limit;
16
17
    /**
18
     * @var int
19
     */
20
    private $count;
21
22
    /**
23
     * @var int
24
     */
25
    private $pageCount;
26
27
    /**
28
     * @var array|\Traversable
29
     */
30
    private $results;
31
32
    /**
33
     * Pager constructor.
34
     * @param $currentPage
35
     * @param $limit
36
     * @param $count
37
     * @param $pageCount
38
     * @param $results
39
     */
40
    public function __construct($currentPage, $limit, $count, $pageCount, $results)
41
    {
42
        $this->currentPage = $currentPage;
43
        $this->limit = $limit;
44
        $this->count = $count;
45
        $this->pageCount = $pageCount;
46
        $this->results = $results;
47
    }
48
49
    /**
50
     * @return int
51
     */
52
    public function getCurrentPage()
53
    {
54
        return $this->currentPage;
55
    }
56
57
    /**
58
     * @return int
59
     */
60
    public function getPerPage()
61
    {
62
        return $this->limit;
63
    }
64
65
    /**
66
     * @return int
67
     */
68
    public function getCount()
69
    {
70
        return $this->count;
71
    }
72
73
    /**
74
     * @return int
75
     */
76
    public function getPageCount()
77
    {
78
        return $this->pageCount;
79
    }
80
81
    /**
82
     * @return array|\Traversable
83
     */
84
    public function getResults()
85
    {
86
        return $this->results;
87
    }
88
}
89