Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
42 | 29 | protected static function _decodeFromDER(Identifier $identifier, |
|
43 | string $data, int &$offset): ElementBase |
||
44 | { |
||
45 | 29 | $idx = $offset; |
|
46 | 29 | if (!$identifier->isPrimitive()) { |
|
47 | 1 | throw new DecodeException('Null value must be primitive.'); |
|
48 | } |
||
49 | // null type has always zero length |
||
50 | 28 | Length::expectFromDER($data, $idx, 0); |
|
51 | 27 | $offset = $idx; |
|
52 | 27 | return new self(); |
|
53 | } |
||
55 |