Completed
Push — master ( 2d3077...b72a1b )
by Peter
02:16
created

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