NullLexeme   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getSymbols() 0 3 1
A getFinishOffsets() 0 3 1
A getConstituentLexeme() 0 3 1
A getStartOffsets() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Remorhaz\Lexer\Runtime\IO;
6
7
/**
8
 * @psalm-immutable
9
 */
10
final class NullLexeme implements LexemeInterface
11
{
12
13
    /**
14
     * @return SymbolInterface[]
15
     * @psalm-return array<int,SymbolInterface>
16
     * @psalm-pure
17
     */
18 1
    public function getSymbols(): array
19
    {
20 1
        return [];
21
    }
22
23
    /**
24
     * @return int[]
25
     * @psalm-return array<int,int>
26
     * @psalm-pure
27
     */
28 1
    public function getStartOffsets(): array
29
    {
30 1
        return [];
31
    }
32
33
    /**
34
     * @return int[]
35
     * @psalm-return array<int,int>
36
     * @psalm-pure
37
     */
38 1
    public function getFinishOffsets(): array
39
    {
40 1
        return [];
41
    }
42
43
    /**
44
     * @return LexemeInterface
45
     * @psalm-pure
46
     */
47 1
    public function getConstituentLexeme(): LexemeInterface
48
    {
49 1
        return $this;
50
    }
51
}
52