Completed
Push — master ( 9ec6aa...297e32 )
by Reen
07:19 queued 05:21
created

Pager   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 62
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getCurrentPage() 0 4 1
A getLimit() 0 4 1
A getCount() 0 4 1
A getList() 0 4 1
1
<?php
2
3
namespace ReenExeCubeTime\LightPaginator;
4
5
use ReenExeCubeTime\LightPaginator\Adapter\AdapterInterface;
6
7
class Pager implements PagerInterface
8
{
9
    /**
10
     * @var int
11
     */
12
    private $currentPage;
13
14
    /**
15
     * @var int
16
     */
17
    private $limit;
18
19
    /**
20
     * @var int
21
     */
22
    private $count;
23
24
    /**
25
     * @var array|\Traversable
26
     */
27
    private $list;
28
29
    public function __construct($currentPage, $limit, $count, $list)
30
    {
31
        $this->currentPage = $currentPage;
32
        $this->limit = $limit;
33
        $this->count = $count;
34
        $this->list = $list;
35
    }
36
37
    /**
38
     * @return int
39
     */
40
    public function getCurrentPage()
41
    {
42
        return $this->currentPage;
43
    }
44
45
    /**
46
     * @return int
47
     */
48
    public function getLimit()
49
    {
50
        return $this->limit;
51
    }
52
53
    /**
54
     * @return int
55
     */
56
    public function getCount()
57
    {
58
        return $this->count;
59
    }
60
61
    /**
62
     * @return array|\Traversable
63
     */
64
    public function getList()
65
    {
66
        return $this->list;
67
    }
68
}
69