Token::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 10
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