Conditions | 4 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
64 | 8 | public static function fromASN1(TaggedType $el): self |
|
65 | { |
||
66 | 8 | switch ($el->tag()) { |
|
67 | 8 | case self::TYPE_NAME: |
|
68 | 5 | return TargetName::fromChosenASN1($el->asExplicit()->asTagged()); |
|
69 | 5 | case self::TYPE_GROUP: |
|
70 | 3 | return TargetGroup::fromChosenASN1($el->asExplicit()->asTagged()); |
|
71 | 2 | case self::TYPE_CERT: |
|
72 | 1 | throw new \RuntimeException('targetCert not supported.'); |
|
73 | } |
||
74 | 1 | throw new \UnexpectedValueException( |
|
75 | 1 | 'Target type ' . $el->tag() . ' not supported.'); |
|
76 | } |
||
106 |