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