LexerObject::getTemplate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Bavix\Lexer;
4
5
class LexerObject
6
{
7
8
    /**
9
     * @var string
10
     */
11
    protected $source;
12
13
    /**
14
     * @var string
15
     */
16
    protected $template;
17
18
    /**
19
     * @var array
20
     */
21
    protected $lexemes;
22
23
    /**
24
     * LexerObject constructor.
25
     * @param string $source
26
     * @param string $template
27
     * @param array $lexemes
28
     */
29 19
    public function __construct(string $source, string $template, array $lexemes)
30
    {
31 19
        $this->source = $source;
32 19
        $this->template = $template;
33 19
        $this->lexemes = $lexemes;
34 19
    }
35
36
    /**
37
     * @return string
38
     */
39 18
    public function getSource(): string
40
    {
41 18
        return $this->source;
42
    }
43
44
    /**
45
     * @return string
46
     */
47 18
    public function getTemplate(): string
48
    {
49 18
        return $this->template;
50
    }
51
52
    /**
53
     * @return array
54
     */
55 19
    public function getLexemes(): array
56
    {
57 19
        return $this->lexemes;
58
    }
59
60
}
61