Completed
Push — master ( f11337...38bba2 )
by Kevin
02:15
created

PagePager   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 6
c 1
b 0
f 1
lcom 1
cbo 2
dl 0
loc 49
ccs 13
cts 13
cp 1
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getCurrentPage() 0 4 1
A getLimit() 0 4 1
A count() 0 4 1
A totalCount() 0 4 1
A getResults() 0 4 1
1
<?php
2
3
namespace Zenstruck\Porpaginas\Pager;
4
5
use Zenstruck\Porpaginas\Page;
6
use Zenstruck\Porpaginas\Pager;
7
8
/**
9
 * @author Kevin Bond <[email protected]>
10
 */
11
final class PagePager extends Pager
12
{
13
    private $page;
14
15 5
    public function __construct(Page $page)
16
    {
17 5
        $this->page = $page;
18 5
    }
19
20
    /**
21
     * {@inheritdoc}
22
     */
23 5
    public function getCurrentPage()
24
    {
25 5
        return $this->page->getCurrentPage();
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31 4
    public function getLimit()
32
    {
33 4
        return $this->page->getCurrentLimit();
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39 5
    public function count()
40
    {
41 5
        return $this->page->count();
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47 5
    public function totalCount()
48
    {
49 5
        return $this->page->totalCount();
50
    }
51
52
    /**
53
     * {@inheritdoc}
54
     */
55 5
    public function getResults()
56
    {
57 5
        return $this->page;
58
    }
59
}
60