@@ -401,20 +401,20 @@ discard block |
||
| 401 | 401 | protected static function _determineImplClass(Identifier $identifier): string |
| 402 | 402 | { |
| 403 | 403 | switch ($identifier->typeClass()) { |
| 404 | - case Identifier::CLASS_UNIVERSAL: |
|
| 405 | - $cls = self::_determineUniversalImplClass($identifier->intTag()); |
|
| 406 | - // constructed strings may be present in BER |
|
| 407 | - if ($identifier->isConstructed() && |
|
| 408 | - is_subclass_of($cls, PrimitiveString::class)) { |
|
| 409 | - $cls = ConstructedString::class; |
|
| 410 | - } |
|
| 411 | - return $cls; |
|
| 412 | - case Identifier::CLASS_CONTEXT_SPECIFIC: |
|
| 413 | - return ContextSpecificType::class; |
|
| 414 | - case Identifier::CLASS_APPLICATION: |
|
| 415 | - return ApplicationType::class; |
|
| 416 | - case Identifier::CLASS_PRIVATE: |
|
| 417 | - return PrivateType::class; |
|
| 404 | + case Identifier::CLASS_UNIVERSAL: |
|
| 405 | + $cls = self::_determineUniversalImplClass($identifier->intTag()); |
|
| 406 | + // constructed strings may be present in BER |
|
| 407 | + if ($identifier->isConstructed() && |
|
| 408 | + is_subclass_of($cls, PrimitiveString::class)) { |
|
| 409 | + $cls = ConstructedString::class; |
|
| 410 | + } |
|
| 411 | + return $cls; |
|
| 412 | + case Identifier::CLASS_CONTEXT_SPECIFIC: |
|
| 413 | + return ContextSpecificType::class; |
|
| 414 | + case Identifier::CLASS_APPLICATION: |
|
| 415 | + return ApplicationType::class; |
|
| 416 | + case Identifier::CLASS_PRIVATE: |
|
| 417 | + return PrivateType::class; |
|
| 418 | 418 | } |
| 419 | 419 | throw new \UnexpectedValueException( |
| 420 | 420 | sprintf('%s %d not implemented.', |
@@ -487,10 +487,10 @@ discard block |
||
| 487 | 487 | private function _isPseudoType(int $tag): bool |
| 488 | 488 | { |
| 489 | 489 | switch ($tag) { |
| 490 | - case self::TYPE_STRING: |
|
| 491 | - return $this instanceof StringType; |
|
| 492 | - case self::TYPE_TIME: |
|
| 493 | - return $this instanceof TimeType; |
|
| 490 | + case self::TYPE_STRING: |
|
| 491 | + return $this instanceof StringType; |
|
| 492 | + case self::TYPE_TIME: |
|
| 493 | + return $this instanceof TimeType; |
|
| 494 | 494 | } |
| 495 | 495 | return false; |
| 496 | 496 | } |
@@ -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 Sop\ASN1\Type\Constructed; |
| 6 | 6 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function strings(): array |
| 47 | 47 | { |
| 48 | - return array_map(function (PrimitiveString $el) { |
|
| 48 | + return array_map(function(PrimitiveString $el) { |
|
| 49 | 49 | return $el->string(); |
| 50 | 50 | }, $this->_elements); |
| 51 | 51 | } |