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