@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace ASN1\Type\Constructed; |
| 6 | 6 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | { |
| 34 | 34 | $obj = clone $this; |
| 35 | 35 | usort($obj->_elements, |
| 36 | - function (Element $a, Element $b) { |
|
| 36 | + function(Element $a, Element $b) { |
|
| 37 | 37 | if ($a->typeClass() != $b->typeClass()) { |
| 38 | 38 | return $a->typeClass() < $b->typeClass() ? -1 : 1; |
| 39 | 39 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | { |
| 56 | 56 | $obj = clone $this; |
| 57 | 57 | usort($obj->_elements, |
| 58 | - function (Element $a, Element $b) { |
|
| 58 | + function(Element $a, Element $b) { |
|
| 59 | 59 | $a_der = $a->toDER(); |
| 60 | 60 | $b_der = $b->toDER(); |
| 61 | 61 | return strcmp($a_der, $b_der); |
@@ -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\Constructed; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ discard block |
||
| 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 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * @return self |
| 69 | 69 | */ |
| 70 | 70 | protected static function _decodeFromDER(Identifier $identifier, string $data, |
| 71 | - int &$offset) |
|
| 71 | + int & $offset) |
|
| 72 | 72 | { |
| 73 | 73 | $idx = $offset; |
| 74 | 74 | $len = Length::expectFromDER($data, $idx)->length(); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | { |
| 109 | 109 | return implode(".", |
| 110 | 110 | array_map( |
| 111 | - function ($num) { |
|
| 111 | + function($num) { |
|
| 112 | 112 | return gmp_strval($num, 10); |
| 113 | 113 | }, $subids)); |
| 114 | 114 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 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 | |
@@ -121,11 +121,11 @@ discard block |
||
| 121 | 121 | * @return self |
| 122 | 122 | */ |
| 123 | 123 | protected static function _decodeFromDER(Identifier $identifier, string $data, |
| 124 | - int &$offset) |
|
| 124 | + int & $offset) |
|
| 125 | 125 | { |
| 126 | 126 | $idx = $offset; |
| 127 | 127 | $length = Length::expectFromDER($data, $idx); |
| 128 | - if (gmp_cmp(gmp_init($length->length(),10), gmp_init(PHP_INT_MAX, 10)) >= 0) { |
|
| 128 | + if (gmp_cmp(gmp_init($length->length(), 10), gmp_init(PHP_INT_MAX, 10)) >= 0) { |
|
| 129 | 129 | throw new \RuntimeException("Integer length too large"); |
| 130 | 130 | } |
| 131 | 131 | |
@@ -1,6 +1,6 @@ discard block |
||
| 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 | |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | * @return self |
| 179 | 179 | */ |
| 180 | 180 | protected static function _decodeFromDER(Identifier $identifier, string $data, |
| 181 | - int &$offset) |
|
| 181 | + int & $offset) |
|
| 182 | 182 | { |
| 183 | 183 | $idx = $offset; |
| 184 | 184 | $length = Length::expectFromDER($data, $idx); |
@@ -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 | |
@@ -1,6 +1,6 @@ discard block |
||
| 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 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * @return self |
| 63 | 63 | */ |
| 64 | 64 | protected static function _decodeFromDER(Identifier $identifier, string $data, |
| 65 | - int &$offset) |
|
| 65 | + int & $offset) |
|
| 66 | 66 | { |
| 67 | 67 | $idx = $offset; |
| 68 | 68 | Length::expectFromDER($data, $idx, 1); |
@@ -1,6 +1,6 @@ discard block |
||
| 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 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * @return self |
| 43 | 43 | */ |
| 44 | 44 | protected static function _decodeFromDER(Identifier $identifier, string $data, |
| 45 | - int &$offset) |
|
| 45 | + int & $offset) |
|
| 46 | 46 | { |
| 47 | 47 | $idx = $offset; |
| 48 | 48 | if (!$identifier->isPrimitive()) { |
@@ -1,6 +1,6 @@ discard block |
||
| 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 | |
@@ -32,14 +32,14 @@ discard block |
||
| 32 | 32 | * @link http://php.net/manual/en/language.types.float.php |
| 33 | 33 | * @var string |
| 34 | 34 | */ |
| 35 | - const PHP_EXPONENT_DNUM = '/^'. /* @formatter:off */ |
|
| 36 | - '([+\-]?'. // sign |
|
| 37 | - '(?:'. |
|
| 38 | - '\d+'. // LNUM |
|
| 39 | - '|'. |
|
| 40 | - '(?:\d*\.\d+|\d+\.\d*)'. // DNUM |
|
| 41 | - '))[eE]'. |
|
| 42 | - '([+\-]?\d+)'. // exponent |
|
| 35 | + const PHP_EXPONENT_DNUM = '/^' . /* @formatter:off */ |
|
| 36 | + '([+\-]?' . // sign |
|
| 37 | + '(?:' . |
|
| 38 | + '\d+' . // LNUM |
|
| 39 | + '|' . |
|
| 40 | + '(?:\d*\.\d+|\d+\.\d*)' . // DNUM |
|
| 41 | + '))[eE]' . |
|
| 42 | + '([+\-]?\d+)' . // exponent |
|
| 43 | 43 | '$/'; /* @formatter:on */ |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | * @return self |
| 115 | 115 | */ |
| 116 | 116 | protected static function _decodeFromDER(Identifier $identifier, string $data, |
| 117 | - int &$offset) |
|
| 117 | + int & $offset) |
|
| 118 | 118 | { |
| 119 | 119 | $idx = $offset; |
| 120 | 120 | $length = Length::expectFromDER($data, $idx); |