Correction::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
1
<?php declare(strict_types = 1);
2
3
namespace Apicart\FQL\Value;
4
5
class Correction
6
{
7
8
    /**
9
     * @var mixed
10
     */
11
    private $type;
12
13
    /**
14
     * @var Token[]
15
     */
16
    private $tokens = [];
17
18
19
    /**
20
     * @param mixed $type
21
     * @param Token[] ...$tokens
22
     */
23 93
    public function __construct($type, Token ...$tokens)
24
    {
25 93
        $this->type = $type;
26 93
        $this->tokens = $tokens;
27 93
    }
28
29
30
    /**
31
     * @return mixed
32
     */
33
    public function getType()
34
    {
35
        return $this->type;
36
    }
37
38
39
    public function getTokens(): array
40
    {
41
        return $this->tokens;
42
    }
43
44
}
45