Conditions | 2 |
Paths | 2 |
Total Lines | 25 |
Code Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Tests | 21 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
34 | 79 | private static function init(): void |
|
35 | { |
||
36 | 79 | if (!\is_null(self::$symbols)) { |
|
37 | 79 | return; |
|
38 | } |
||
39 | |||
40 | 1 | self::$symbols = Map::of('string', 'string') |
|
41 | 1 | ('b', SignedOctet::class) |
|
42 | 1 | ('B', UnsignedOctet::class) |
|
43 | 1 | ('U', SignedShortInteger::class) |
|
44 | 1 | ('u', UnsignedShortInteger::class) |
|
45 | 1 | ('I', SignedLongInteger::class) |
|
46 | 1 | ('i', UnsignedLongInteger::class) |
|
47 | 1 | ('L', SignedLongLongInteger::class) |
|
48 | 1 | ('l', UnsignedLongLongInteger::class) |
|
49 | 1 | ('D', Decimal::class) |
|
50 | 1 | ('T', Timestamp::class) |
|
51 | 1 | ('V', VoidValue::class) |
|
52 | 1 | ('t', Bits::class) |
|
53 | 1 | ('s', ShortString::class) |
|
54 | 1 | ('S', LongString::class) |
|
55 | 1 | ('A', Sequence::class) |
|
56 | 1 | ('F', Table::class); |
|
57 | self::$classes = self::$symbols->map(static function(string $symbol, string $class): Pair { |
||
58 | 1 | return new Pair($class, $symbol); |
|
59 | 1 | }); |
|
62 |