Node   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 53
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

4 Methods

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