| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 42 | public function getPublicKey(array $params, string $serialNo): string |
||
| 43 | { |
||
| 44 | $config = get_wechat_config($params); |
||
| 45 | |||
| 46 | $publicKey = $config->get('wechat_public_cert_path.'.$serialNo); |
||
| 47 | |||
| 48 | if (empty($publicKey)) { |
||
| 49 | throw new InvalidParamsException(Exception::WECHAT_SERIAL_NO_NOT_FOUND, 'Wechat serial no not found: '.$serialNo); |
||
| 50 | } |
||
| 51 | |||
| 52 | return $publicKey; |
||
| 53 | } |
||
| 55 |