| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public static function createFromJson(array $json): self |
||
| 41 | { |
||
| 42 | if (!array_key_exists('clientDataJSON', $json)) { |
||
| 43 | throw new \InvalidArgumentException(); |
||
| 44 | } |
||
| 45 | if (!array_key_exists('attestationObject', $json)) { |
||
| 46 | throw new \InvalidArgumentException(); |
||
| 47 | } |
||
| 48 | |||
| 49 | return new self( |
||
| 50 | $json['clientDataJSON'], |
||
| 51 | $json['attestationObject'] |
||
| 52 | ); |
||
| 74 |