@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | * @return self |
| 70 | 70 | */ |
| 71 | 71 | protected static function _decodeFromDER(Identifier $identifier, string $data, |
| 72 | - int &$offset): ElementBase |
|
| 72 | + int & $offset): ElementBase |
|
| 73 | 73 | { |
| 74 | 74 | $idx = $offset; |
| 75 | 75 | $len = Length::expectFromDER($data, $idx)->intLength(); |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | { |
| 110 | 110 | return implode(".", |
| 111 | 111 | array_map( |
| 112 | - function ($num) { |
|
| 112 | + function($num) { |
|
| 113 | 113 | return gmp_strval($num, 10); |
| 114 | 114 | }, $subids)); |
| 115 | 115 | } |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | * @return self |
| 93 | 93 | */ |
| 94 | 94 | protected static function _decodeFromDER(Identifier $identifier, string $data, |
| 95 | - int &$offset): ElementBase |
|
| 95 | + int & $offset): ElementBase |
|
| 96 | 96 | { |
| 97 | 97 | $idx = $offset; |
| 98 | 98 | $length = Length::expectFromDER($data, $idx)->intLength(); |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | * @return self |
| 93 | 93 | */ |
| 94 | 94 | protected static function _decodeFromDER(Identifier $identifier, string $data, |
| 95 | - int &$offset): ElementBase |
|
| 95 | + int & $offset): ElementBase |
|
| 96 | 96 | { |
| 97 | 97 | $idx = $offset; |
| 98 | 98 | $length = Length::expectFromDER($data, $idx)->intLength(); |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | * @return self |
| 93 | 93 | */ |
| 94 | 94 | protected static function _decodeFromDER(Identifier $identifier, string $data, |
| 95 | - int &$offset): ElementBase |
|
| 95 | + int & $offset): ElementBase |
|
| 96 | 96 | { |
| 97 | 97 | $idx = $offset; |
| 98 | 98 | $length = Length::expectFromDER($data, $idx)->intLength(); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | * |
| 59 | 59 | * @var array |
| 60 | 60 | */ |
| 61 | - const MAP_TAG_TO_CLASS = [ /* @formatter:off */ |
|
| 61 | + const MAP_TAG_TO_CLASS = [/* @formatter:off */ |
|
| 62 | 62 | self::TYPE_BOOLEAN => Primitive\Boolean::class, |
| 63 | 63 | self::TYPE_INTEGER => Primitive\Integer::class, |
| 64 | 64 | self::TYPE_BIT_STRING => Primitive\BitString::class, |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | * |
| 114 | 114 | * @var array |
| 115 | 115 | */ |
| 116 | - const MAP_TYPE_TO_NAME = [ /* @formatter:off */ |
|
| 116 | + const MAP_TYPE_TO_NAME = [/* @formatter:off */ |
|
| 117 | 117 | self::TYPE_EOC => "EOC", |
| 118 | 118 | self::TYPE_BOOLEAN => "BOOLEAN", |
| 119 | 119 | self::TYPE_INTEGER => "INTEGER", |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | * @return self |
| 190 | 190 | */ |
| 191 | 191 | protected static function _decodeFromDER(Identifier $identifier, string $data, |
| 192 | - int &$offset): ElementBase |
|
| 192 | + int & $offset): ElementBase |
|
| 193 | 193 | { |
| 194 | 194 | throw new \BadMethodCallException( |
| 195 | 195 | __METHOD__ . " must be implemented in derived class."); |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | * type, but decoding yields another type |
| 209 | 209 | * @return ElementBase |
| 210 | 210 | */ |
| 211 | - public static function fromDER(string $data, int &$offset = null): ElementBase |
|
| 211 | + public static function fromDER(string $data, int & $offset = null): ElementBase |
|
| 212 | 212 | { |
| 213 | 213 | // decode identifier |
| 214 | 214 | $idx = $offset ? $offset : 0; |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @var array |
| 28 | 28 | */ |
| 29 | - const MAP_CLASS_TO_NAME = [ /* @formatter:off */ |
|
| 29 | + const MAP_CLASS_TO_NAME = [/* @formatter:off */ |
|
| 30 | 30 | self::CLASS_UNIVERSAL => "UNIVERSAL", |
| 31 | 31 | self::CLASS_APPLICATION => "APPLICATION", |
| 32 | 32 | self::CLASS_CONTEXT_SPECIFIC => "CONTEXT SPECIFIC", |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | * @throws DecodeException If decoding fails |
| 85 | 85 | * @return self |
| 86 | 86 | */ |
| 87 | - public static function fromDER(string $data, int &$offset = null): Identifier |
|
| 87 | + public static function fromDER(string $data, int & $offset = null): Identifier |
|
| 88 | 88 | { |
| 89 | 89 | $idx = $offset ? $offset : 0; |
| 90 | 90 | $datalen = strlen($data); |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | * @throws DecodeException If decoding fails |
| 118 | 118 | * @return string Tag number |
| 119 | 119 | */ |
| 120 | - private static function _decodeLongFormTag(string $data, int &$offset): string |
|
| 120 | + private static function _decodeLongFormTag(string $data, int & $offset): string |
|
| 121 | 121 | { |
| 122 | 122 | $datalen = strlen($data); |
| 123 | 123 | $tag = gmp_init(0, 10); |