LinkedDataNode   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 7
eloc 11
dl 0
loc 45
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A value() 0 3 1
A setPrev() 0 3 1
A setNext() 0 3 1
A prev() 0 3 1
A next() 0 3 1
A __construct() 0 3 1
A setValue() 0 3 1
1
<?php namespace Mbh\Collection\Internal;
2
3
/**
4
 * MBHFramework
5
 *
6
 * @link      https://github.com/MBHFramework/mbh-framework
7
 * @copyright Copyright (c) 2017 Ulises Jeremias Cornejo Fandos
8
 * @license   https://github.com/MBHFramework/mbh-framework/blob/master/LICENSE (MIT License)
9
 */
10
11
use Mbh\Collection\Internal\Interfaces\LinkedNode;
12
13
/**
14
 * @internal
15
 */
16
class LinkedDataNode implements LinkedNode
17
{
18
    private $prev;
19
    private $value;
20
    private $next;
21
22
    public function __construct($value)
23
    {
24
        $this->value = $value;
25
    }
26
27
    public function value()
28
    {
29
        return $this->value;
30
    }
31
32
    public function setValue($value)
33
    {
34
        $this->value = $value;
35
    }
36
37
    /**
38
     * @return LinkedNode
39
     */
40
    public function prev()
41
    {
42
        return $this->prev;
43
    }
44
45
    /**
46
     * @return LinkedNode
47
     */
48
    public function next()
49
    {
50
        return $this->next;
51
    }
52
53
    public function setPrev(LinkedNode $prev)
54
    {
55
        $this->prev = $prev;
56
    }
57
58
    public function setNext(LinkedNode $next)
59
    {
60
        $this->next = $next;
61
    }
62
}
63