Literal   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getValue() 0 4 1
A evaluate() 0 4 1
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