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