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
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 53
ccs 11
cts 11
cp 1
rs 10

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
 * 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