GroupBegin   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 34
ccs 9
cts 9
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getDomain() 0 3 1
A getDelimiter() 0 3 1
1
<?php declare(strict_types = 1);
2
3
namespace Apicart\FQL\Token\Token;
4
5
use Apicart\FQL\Tokenizer\Tokenizer;
6
use Apicart\FQL\Value\Token;
7
8
final class GroupBegin extends Token
9
{
10
11
    /**
12
     * Holds group's left side delimiter string.
13
     *
14
     * @var string
15
     */
16
    private $delimiter;
17
18
    /**
19
     * @var string|null
20
     */
21
    private $domain;
22
23
24 88
    public function __construct(string $lexeme, int $position, string $delimiter, ?string $domain)
25
    {
26 88
        $this->delimiter = $delimiter;
27 88
        $this->domain = $domain;
28
29 88
        parent::__construct(Tokenizer::TOKEN_GROUP_BEGIN, $lexeme, $position);
30 88
    }
31
32
33 24
    public function getDelimiter(): string
34
    {
35 24
        return $this->delimiter;
36
    }
37
38
39 24
    public function getDomain(): ?string
40
    {
41 24
        return $this->domain;
42
    }
43
44
}
45