| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 40 | { |
||
| 41 | $jwk = $input->getArgument('jwk'); |
||
| 42 | $json = $this->jsonConverter->decode($jwk); |
||
| 43 | if (!is_array($json)) { |
||
| 44 | throw new \InvalidArgumentException('Invalid input.'); |
||
| 45 | } |
||
| 46 | $key = RSAKey::createFromJWK(JWK::create($json)); |
||
| 47 | $key->optimize(); |
||
| 48 | $this->prepareOutput($input, $output, $key->toJwk()); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |