VariableNode::normalizeValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/*
3
 * This file is part of the Borobudur-Config package.
4
 *
5
 * (c) Hexacodelabs <http://hexacodelabs.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Borobudur\Config\Definition;
12
13
/**
14
 * @author      Iqbal Maulana <[email protected]>
15
 * @created     8/10/15
16
 */
17
class VariableNode extends AbstractNode implements PrototypeNodeInterface
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22
    protected function validateType($value)
23
    {
24
        // variable accept all type of value.
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    protected function normalizeValue($value)
31
    {
32
        return $value;
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38
    protected function mergeValues($left, $right)
39
    {
40
        return $right;
41
    }
42
43
    /**
44
     * {@inheritdoc}
45
     */
46
    protected function finalizeValue($value)
47
    {
48
        return $value;
49
    }
50
51
    /**
52
     * {@inheritdoc}
53
     */
54
    public function setName($name)
55
    {
56
        $this->name = $name;
57
    }
58
}
59