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

PagePager::count()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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