Literal::evaluate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace PeacefulBit\Slate\Parser\Nodes;
4
5
use PeacefulBit\Slate\Core\Frame;
6
7
abstract class Literal extends Node
8
{
9
    /**
10
     * @var mixed
11
     */
12
    private $value;
13
14
    /**
15
     * @param $value
16
     */
17
    public function __construct($value)
18
    {
19
        $this->value = $value;
20
    }
21
22
    /**
23
     * @return mixed
24
     */
25
    public function getValue()
26
    {
27
        return $this->value;
28
    }
29
30
    /**
31
     * @param Frame $frame
32
     * @return mixed
33
     */
34
    public function evaluate(Frame $frame)
35
    {
36
        return $this->getValue();
37
    }
38
}
39