@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | { |
32 | 32 | $obj = clone $this; |
33 | 33 | usort($obj->_elements, |
34 | - function (Element $a, Element $b) { |
|
34 | + function(Element $a, Element $b) { |
|
35 | 35 | if ($a->typeClass() != $b->typeClass()) { |
36 | 36 | return $a->typeClass() < $b->typeClass() ? -1 : 1; |
37 | 37 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | { |
54 | 54 | $obj = clone $this; |
55 | 55 | usort($obj->_elements, |
56 | - function (Element $a, Element $b) { |
|
56 | + function(Element $a, Element $b) { |
|
57 | 57 | $a_der = $a->toDER(); |
58 | 58 | $b_der = $b->toDER(); |
59 | 59 | return strcmp($a_der, $b_der); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * |
26 | 26 | * @var array |
27 | 27 | */ |
28 | - const MAP_CLASS_TO_NAME = [ /* @formatter:off */ |
|
28 | + const MAP_CLASS_TO_NAME = [/* @formatter:off */ |
|
29 | 29 | self::CLASS_UNIVERSAL => "UNIVERSAL", |
30 | 30 | self::CLASS_APPLICATION => "APPLICATION", |
31 | 31 | self::CLASS_CONTEXT_SPECIFIC => "CONTEXT SPECIFIC", |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * @throws DecodeException If decoding fails |
84 | 84 | * @return self |
85 | 85 | */ |
86 | - public static function fromDER(string $data, int &$offset = null): self |
|
86 | + public static function fromDER(string $data, int & $offset = null): self |
|
87 | 87 | { |
88 | 88 | $idx = $offset ? $offset : 0; |
89 | 89 | $datalen = strlen($data); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | * @throws DecodeException If decoding fails |
117 | 117 | * @return string Tag number |
118 | 118 | */ |
119 | - private static function _decodeLongFormTag(string $data, int &$offset): string |
|
119 | + private static function _decodeLongFormTag(string $data, int & $offset): string |
|
120 | 120 | { |
121 | 121 | $datalen = strlen($data); |
122 | 122 | $tag = gmp_init(0, 10); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | * @throws DecodeException If decoding fails |
50 | 50 | * @return self |
51 | 51 | */ |
52 | - public static function fromDER(string $data, int &$offset = null): self |
|
52 | + public static function fromDER(string $data, int & $offset = null): self |
|
53 | 53 | { |
54 | 54 | $idx = $offset ? $offset : 0; |
55 | 55 | $datalen = strlen($data); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | * @return string Integer as a string |
89 | 89 | */ |
90 | 90 | private static function _decodeLongFormLength(int $length, string $data, |
91 | - int &$offset): string |
|
91 | + int & $offset): string |
|
92 | 92 | { |
93 | 93 | // first octet must not be 0xff (spec 8.1.3.5c) |
94 | 94 | if ($length == 127) { |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @throws DecodeException If decoding or expectation fails |
118 | 118 | * @return self |
119 | 119 | */ |
120 | - public static function expectFromDER(string $data, int &$offset, |
|
120 | + public static function expectFromDER(string $data, int & $offset, |
|
121 | 121 | int $expected = null): self |
122 | 122 | { |
123 | 123 | $idx = $offset; |
@@ -22,7 +22,7 @@ |
||
22 | 22 | * {@inheritdoc} |
23 | 23 | */ |
24 | 24 | protected static function _decodeFromDER(Identifier $identifier, string $data, |
25 | - int &$offset): ElementBase |
|
25 | + int & $offset): ElementBase |
|
26 | 26 | { |
27 | 27 | $idx = $offset; |
28 | 28 | $type = new DERTaggedType($identifier, $data, $idx); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | * @return self |
92 | 92 | */ |
93 | 93 | protected static function _decodeFromDER(Identifier $identifier, string $data, |
94 | - int &$offset): ElementBase |
|
94 | + int & $offset): ElementBase |
|
95 | 95 | { |
96 | 96 | $idx = $offset; |
97 | 97 | if (!$identifier->isConstructed()) { |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | { |
237 | 237 | if (!isset($this->_unspecifiedTypes)) { |
238 | 238 | $this->_unspecifiedTypes = array_map( |
239 | - function (Element $el) { |
|
239 | + function(Element $el) { |
|
240 | 240 | return new UnspecifiedType($el); |
241 | 241 | }, $this->_elements); |
242 | 242 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | * @return self |
34 | 34 | */ |
35 | 35 | protected static function _decodeFromDER(Identifier $identifier, string $data, |
36 | - int &$offset): ElementBase |
|
36 | + int & $offset): ElementBase |
|
37 | 37 | { |
38 | 38 | $idx = $offset; |
39 | 39 | if (!$identifier->isPrimitive()) { |
@@ -179,7 +179,7 @@ |
||
179 | 179 | * @return self |
180 | 180 | */ |
181 | 181 | protected static function _decodeFromDER(Identifier $identifier, string $data, |
182 | - int &$offset): ElementBase |
|
182 | + int & $offset): ElementBase |
|
183 | 183 | { |
184 | 184 | $idx = $offset; |
185 | 185 | $length = Length::expectFromDER($data, $idx); |
@@ -63,7 +63,7 @@ |
||
63 | 63 | * @return self |
64 | 64 | */ |
65 | 65 | protected static function _decodeFromDER(Identifier $identifier, string $data, |
66 | - int &$offset): ElementBase |
|
66 | + int & $offset): ElementBase |
|
67 | 67 | { |
68 | 68 | $idx = $offset; |
69 | 69 | Length::expectFromDER($data, $idx, 1); |
@@ -33,7 +33,7 @@ |
||
33 | 33 | * @return self |
34 | 34 | */ |
35 | 35 | protected static function _decodeFromDER(Identifier $identifier, string $data, |
36 | - int &$offset): ElementBase |
|
36 | + int & $offset): ElementBase |
|
37 | 37 | { |
38 | 38 | $idx = $offset; |
39 | 39 | if (!$identifier->isPrimitive()) { |