@@ -12,39 +12,39 @@ |
||
12 | 12 | */ |
13 | 13 | class RelativeOID extends ObjectIdentifier |
14 | 14 | { |
15 | - /** |
|
16 | - * Constructor. |
|
17 | - * |
|
18 | - * @param string $oid OID in dotted format |
|
19 | - */ |
|
20 | - public function __construct(string $oid) |
|
21 | - { |
|
22 | - $this->_oid = $oid; |
|
23 | - $this->_subids = self::_explodeDottedOID($oid); |
|
24 | - $this->_typeTag = self::TYPE_RELATIVE_OID; |
|
25 | - } |
|
15 | + /** |
|
16 | + * Constructor. |
|
17 | + * |
|
18 | + * @param string $oid OID in dotted format |
|
19 | + */ |
|
20 | + public function __construct(string $oid) |
|
21 | + { |
|
22 | + $this->_oid = $oid; |
|
23 | + $this->_subids = self::_explodeDottedOID($oid); |
|
24 | + $this->_typeTag = self::TYPE_RELATIVE_OID; |
|
25 | + } |
|
26 | 26 | |
27 | - /** |
|
28 | - * |
|
29 | - * {@inheritdoc} |
|
30 | - */ |
|
31 | - protected function _encodedContentDER(): string |
|
32 | - { |
|
33 | - return self::_encodeSubIDs(...$this->_subids); |
|
34 | - } |
|
27 | + /** |
|
28 | + * |
|
29 | + * {@inheritdoc} |
|
30 | + */ |
|
31 | + protected function _encodedContentDER(): string |
|
32 | + { |
|
33 | + return self::_encodeSubIDs(...$this->_subids); |
|
34 | + } |
|
35 | 35 | |
36 | - /** |
|
37 | - * |
|
38 | - * {@inheritdoc} |
|
39 | - * @return self |
|
40 | - */ |
|
41 | - protected static function _decodeFromDER(Identifier $identifier, |
|
42 | - string $data, int &$offset): ElementBase |
|
43 | - { |
|
44 | - $idx = $offset; |
|
45 | - $len = Length::expectFromDER($data, $idx)->intLength(); |
|
46 | - $subids = self::_decodeSubIDs(substr($data, $idx, $len)); |
|
47 | - $offset = $idx + $len; |
|
48 | - return new self(self::_implodeSubIDs(...$subids)); |
|
49 | - } |
|
36 | + /** |
|
37 | + * |
|
38 | + * {@inheritdoc} |
|
39 | + * @return self |
|
40 | + */ |
|
41 | + protected static function _decodeFromDER(Identifier $identifier, |
|
42 | + string $data, int &$offset): ElementBase |
|
43 | + { |
|
44 | + $idx = $offset; |
|
45 | + $len = Length::expectFromDER($data, $idx)->intLength(); |
|
46 | + $subids = self::_decodeSubIDs(substr($data, $idx, $len)); |
|
47 | + $offset = $idx + $len; |
|
48 | + return new self(self::_implodeSubIDs(...$subids)); |
|
49 | + } |
|
50 | 50 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ASN1\Type\Primitive; |
6 | 6 |