Total Complexity | 5 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
7 | class Token |
||
8 | { |
||
9 | public const OBJECT_START = '{'; |
||
10 | public const OBJECT_END = '}'; |
||
11 | public const ARRAY_START = '['; |
||
12 | public const ARRAY_END = ']'; |
||
13 | public const KEY_DELIMITER = ':'; |
||
14 | public const COMA = ','; |
||
15 | public const TRUE = 'true'; |
||
16 | public const FALSE = 'false'; |
||
17 | public const NULL = 'null'; |
||
18 | public const STRING = 'string'; |
||
19 | public const NUMBER = 'number'; |
||
20 | public const WHITESPACE = 'space'; |
||
21 | |||
22 | /** @var string */ |
||
23 | protected $id; |
||
24 | /** @var mixed */ |
||
25 | protected $value; |
||
26 | /** @var int */ |
||
27 | protected $lineNumber; |
||
28 | /** @var int */ |
||
29 | protected $charNumber; |
||
30 | |||
31 | 101 | public function __construct(string $id, $value, int $lineNumber, int $charNumber) |
|
32 | { |
||
33 | 101 | $this->id = $id; |
|
34 | 101 | $this->value = $value; |
|
35 | 101 | $this->lineNumber = $lineNumber; |
|
36 | 101 | $this->charNumber = $charNumber; |
|
37 | 101 | } |
|
38 | |||
39 | /** |
||
40 | * @return string |
||
41 | */ |
||
42 | 101 | public function getId(): string |
|
43 | { |
||
44 | 101 | return $this->id; |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * @return mixed |
||
49 | */ |
||
50 | 97 | public function getValue() |
|
53 | } |
||
54 | |||
55 | /** |
||
56 | * @return int |
||
57 | */ |
||
58 | 52 | public function getLineNumber(): int |
|
61 | } |
||
62 | |||
63 | /** |
||
64 | * @return int |
||
65 | */ |
||
66 | 52 | public function getCharNumber(): int |
|
69 | } |
||
70 | } |
||
71 |