Node::getPage()   A
last analyzed

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 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * AnimeDb package.
4
 *
5
 * @author    Peter Gribanov <[email protected]>
6
 * @copyright Copyright (c) 2011, Peter Gribanov
7
 * @license   http://opensource.org/licenses/GPL-3.0 GPL v3
8
 */
9
namespace AnimeDb\Bundle\AppBundle\Util\Pagination;
10
11
class Node
12
{
13
    /**
14
     * @var int
15
     */
16
    protected $page = 1;
17
18
    /**
19
     * @var string
20
     */
21
    protected $link = '';
22
23
    /**
24
     * @var bool
25
     */
26
    protected $is_current = false;
27
28
    /**
29
     * @param int $page
30
     * @param string $link
31
     * @param bool $is_current
32
     */
33 22
    public function __construct($page = 1, $link = '', $is_current = false)
34
    {
35 22
        $this->page = $page;
36 22
        $this->link = $link;
37 22
        $this->is_current = $is_current;
38 22
    }
39
40
    /**
41
     * @return bool
42
     */
43 2
    public function isCurrent()
44
    {
45 2
        return $this->is_current;
46
    }
47
48
    /**
49
     * @return string
50
     */
51 16
    public function getLink()
52
    {
53 16
        return $this->link;
54
    }
55
56
    /**
57
     * @return int
58
     */
59 16
    public function getPage()
60
    {
61 16
        return $this->page;
62
    }
63
}
64