StringASTNode   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 31
c 0
b 0
f 0
ccs 7
cts 7
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getName() 0 3 1
A getValue() 0 3 1
1
<?php
2
3
namespace Vlaswinkel\Lua\AST;
4
5
/**
6
 * Class StringASTNode
7
 *
8
 * @author  Koen Vlaswinkel <[email protected]>
9
 * @package Vlaswinkel\Lua\AST
10
 */
11
class StringASTNode extends LiteralASTNode {
12
    const NAME = 'string';
13
14
    /**
15
     * @var string
16
     */
17
    private $value;
18
19
    /**
20
     * StringASTNode constructor.
21
     *
22
     * @param string $value
23
     */
24 18
    public function __construct($value) {
25 18
        $this->value = $value;
26 18
    }
27
28
    /**
29
     * @return string
30
     */
31 8
    public function getName() {
32 8
        return self::NAME;
33
    }
34
35
    /**
36
     * @return string
37
     */
38 13
    public function getValue() {
39 13
        return $this->value;
40
    }
41
}