Token   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Test Coverage

Coverage 81.82%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getPosition() 0 3 1
A getLexeme() 0 3 1
A __construct() 0 5 1
A getType() 0 3 1
1
<?php declare(strict_types = 1);
2
3
namespace Apicart\FQL\Value;
4
5
class Token
6
{
7
8
    /**
9
     * @var int
10
     */
11
    private $type;
12
13
    /**
14
     * @var string
15
     */
16
    private $lexeme;
17
18
    /**
19
     * @var int
20
     */
21
    private $position;
22
23
24 511
    public function __construct(int $type, string $lexeme, int $position)
25
    {
26 511
        $this->type = $type;
27 511
        $this->lexeme = $lexeme;
28 511
        $this->position = $position;
29 511
    }
30
31
32 134
    public function getType(): int
33
    {
34 134
        return $this->type;
35
    }
36
37
38 504
    public function getLexeme(): string
39
    {
40 504
        return $this->lexeme;
41
    }
42
43
44
    public function getPosition(): int
45
    {
46
        return $this->position;
47
    }
48
49
}
50