NullLexeme::getStartOffsets()   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 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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