| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | 2 | public static function fromRdnSequence(array $input): self |
|
| 13 | { |
||
| 14 | 2 | $items = []; |
|
| 15 | 2 | foreach ($input as $arr) { |
|
| 16 | // Get the actual item |
||
| 17 | 2 | $rawItem = $arr[0]; |
|
| 18 | 2 | $type = explode('id-at-', $rawItem['type'])[1]; |
|
| 19 | 2 | $value = $rawItem['value']['printableString']; |
|
| 20 | 2 | $items[$type] = $value; |
|
| 21 | } |
||
| 22 | |||
| 23 | 2 | return new static($items); |
|
| 24 | } |
||
| 25 | |||
| 34 |