@@ -71,11 +71,11 @@ |
||
| 71 | 71 | $num = $this->_number->gmpObj(); |
| 72 | 72 | switch (gmp_sign($num)) { |
| 73 | 73 | // positive |
| 74 | - case 1: |
|
| 75 | - return self::_encodePositiveInteger($num); |
|
| 76 | - // negative |
|
| 77 | - case -1: |
|
| 78 | - return self::_encodeNegativeInteger($num); |
|
| 74 | + case 1: |
|
| 75 | + return self::_encodePositiveInteger($num); |
|
| 76 | + // negative |
|
| 77 | + case -1: |
|
| 78 | + return self::_encodeNegativeInteger($num); |
|
| 79 | 79 | } |
| 80 | 80 | // zero |
| 81 | 81 | return "\0"; |
@@ -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 | |
@@ -332,10 +332,10 @@ discard block |
||
| 332 | 332 | private function _isPseudoType(int $tag): bool |
| 333 | 333 | { |
| 334 | 334 | switch ($tag) { |
| 335 | - case self::TYPE_STRING: |
|
| 336 | - return $this instanceof StringType; |
|
| 337 | - case self::TYPE_TIME: |
|
| 338 | - return $this instanceof TimeType; |
|
| 335 | + case self::TYPE_STRING: |
|
| 336 | + return $this instanceof StringType; |
|
| 337 | + case self::TYPE_TIME: |
|
| 338 | + return $this instanceof TimeType; |
|
| 339 | 339 | } |
| 340 | 340 | return false; |
| 341 | 341 | } |
@@ -398,14 +398,14 @@ discard block |
||
| 398 | 398 | protected static function _determineImplClass(Identifier $identifier): string |
| 399 | 399 | { |
| 400 | 400 | switch ($identifier->typeClass()) { |
| 401 | - case Identifier::CLASS_UNIVERSAL: |
|
| 402 | - return self::_determineUniversalImplClass($identifier->intTag()); |
|
| 403 | - case Identifier::CLASS_CONTEXT_SPECIFIC: |
|
| 404 | - return TaggedType::class; |
|
| 405 | - case Identifier::CLASS_APPLICATION: |
|
| 406 | - return ApplicationType::class; |
|
| 407 | - case Identifier::CLASS_PRIVATE: |
|
| 408 | - return PrivateType::class; |
|
| 401 | + case Identifier::CLASS_UNIVERSAL: |
|
| 402 | + return self::_determineUniversalImplClass($identifier->intTag()); |
|
| 403 | + case Identifier::CLASS_CONTEXT_SPECIFIC: |
|
| 404 | + return TaggedType::class; |
|
| 405 | + case Identifier::CLASS_APPLICATION: |
|
| 406 | + return ApplicationType::class; |
|
| 407 | + case Identifier::CLASS_PRIVATE: |
|
| 408 | + return PrivateType::class; |
|
| 409 | 409 | } |
| 410 | 410 | throw new \UnexpectedValueException( |
| 411 | 411 | sprintf("%s %d not implemented.", |
@@ -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; |
| 6 | 6 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * |
| 61 | 61 | * @var array |
| 62 | 62 | */ |
| 63 | - const MAP_TAG_TO_CLASS = [ /* @formatter:off */ |
|
| 63 | + const MAP_TAG_TO_CLASS = [/* @formatter:off */ |
|
| 64 | 64 | self::TYPE_BOOLEAN => Primitive\Boolean::class, |
| 65 | 65 | self::TYPE_INTEGER => Primitive\Integer::class, |
| 66 | 66 | self::TYPE_BIT_STRING => Primitive\BitString::class, |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | * |
| 116 | 116 | * @var array |
| 117 | 117 | */ |
| 118 | - const MAP_TYPE_TO_NAME = [ /* @formatter:off */ |
|
| 118 | + const MAP_TYPE_TO_NAME = [/* @formatter:off */ |
|
| 119 | 119 | self::TYPE_EOC => "EOC", |
| 120 | 120 | self::TYPE_BOOLEAN => "BOOLEAN", |
| 121 | 121 | self::TYPE_INTEGER => "INTEGER", |
@@ -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\Exception; |
| 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\Component; |
| 6 | 6 | |
@@ -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", |
@@ -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\Component; |
| 6 | 6 | |
@@ -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\Util; |
| 6 | 6 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace ASN1\Type; |
| 5 | 5 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | public function __construct(ElementBase ...$elements) |
| 48 | 48 | { |
| 49 | 49 | $this->_elements = array_map( |
| 50 | - function (ElementBase $el) { |
|
| 50 | + function(ElementBase $el) { |
|
| 51 | 51 | return $el->asElement(); |
| 52 | 52 | }, $elements); |
| 53 | 53 | } |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | { |
| 239 | 239 | if (!isset($this->_unspecifiedTypes)) { |
| 240 | 240 | $this->_unspecifiedTypes = array_map( |
| 241 | - function (Element $el) { |
|
| 241 | + function(Element $el) { |
|
| 242 | 242 | return new UnspecifiedType($el); |
| 243 | 243 | }, $this->_elements); |
| 244 | 244 | } |
@@ -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; |
| 6 | 6 | |
@@ -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 | |