LexerObject   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 10
c 1
b 0
f 1
dl 0
loc 53
ccs 11
cts 11
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getLexemes() 0 3 1
A getTemplate() 0 3 1
A __construct() 0 5 1
A getSource() 0 3 1
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