| Total Complexity | 3 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 8 | class TCaptchaV3 extends AbstractPlugin |
||
| 9 | { |
||
| 10 | use TencentCloudAuthV3; |
||
| 11 | |||
| 12 | const RESPONSE_SUCCESS = 1; |
||
| 13 | |||
| 14 | protected $aid; |
||
| 15 | protected $appSecretKey; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Get the method name. |
||
| 19 | * |
||
| 20 | * @return string |
||
| 21 | */ |
||
| 22 | public function getMethod() |
||
| 23 | { |
||
| 24 | return 'TCaptchaV3'; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param $aid |
||
| 29 | * @param $appSecretKey |
||
| 30 | * |
||
| 31 | * @return $this |
||
| 32 | */ |
||
| 33 | public function handle($aid, $appSecretKey) |
||
| 34 | { |
||
| 35 | $this->aid = $aid; |
||
| 36 | $this->appSecretKey = $appSecretKey; |
||
| 37 | |||
| 38 | return $this; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param $ticket |
||
| 43 | * @param $randStr |
||
| 44 | * @param $userIP |
||
| 45 | * @param array $options |
||
| 46 | * |
||
| 47 | * @return bool|array |
||
| 48 | */ |
||
| 49 | public function verify($ticket, $randStr, $userIP, array $options = []) |
||
| 62 | ); |
||
| 63 | } |
||
| 64 | } |
||
| 65 |