Completed
Push — master ( dbe386...572cd1 )
by Reen
02:36
created

Pager   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 76
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 5
Bugs 0 Features 0
Metric Value
wmc 6
c 5
b 0
f 0
lcom 0
cbo 0
dl 0
loc 76
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getCurrentPage() 0 4 1
A getCount() 0 4 1
A getPageCount() 0 4 1
A getResults() 0 4 1
A getPerPage() 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
    public function __construct($currentPage, $limit, $count, $pageCount, $results)
33
    {
34
        $this->currentPage = $currentPage;
35
        $this->limit = $limit;
36
        $this->count = $count;
37
        $this->pageCount = $pageCount;
38
        $this->results = $results;
39
    }
40
41
    /**
42
     * @return int
43
     */
44
    public function getCurrentPage()
45
    {
46
        return $this->currentPage;
47
    }
48
49
    /**
50
     * @return int
51
     */
52
    public function getPerPage()
53
    {
54
        return $this->limit;
55
    }
56
57
    /**
58
     * @return int
59
     */
60
    public function getCount()
61
    {
62
        return $this->count;
63
    }
64
65
    /**
66
     * @return int
67
     */
68
    public function getPageCount()
69
    {
70
        return $this->pageCount;
71
    }
72
73
    /**
74
     * @return array|\Traversable
75
     */
76
    public function getResults()
77
    {
78
        return $this->results;
79
    }
80
}
81