| Total Complexity | 4 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | class Client extends BaseClient |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * Allow image parameter type. |
||
| 26 | * |
||
| 27 | * @var array |
||
| 28 | */ |
||
| 29 | protected $allowTypes = ['photo', 'scan']; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * ID card OCR. |
||
| 33 | * |
||
| 34 | * @param string $type |
||
| 35 | * @param string $path |
||
| 36 | * |
||
| 37 | * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string |
||
| 38 | */ |
||
| 39 | 1 | public function idCard(string $type, string $path) |
|
| 48 | ]); |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Bank card OCR. |
||
| 53 | * |
||
| 54 | * @param string $path |
||
| 55 | * |
||
| 56 | * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string |
||
| 57 | */ |
||
| 58 | 1 | public function bankCard(string $path) |
|
| 59 | { |
||
| 60 | 1 | return $this->httpGet('cv/ocr/bankcard', [ |
|
| 61 | 1 | 'img_url' => $path, |
|
| 62 | ]); |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Vehicle license OCR. |
||
| 67 | * |
||
| 68 | * @param string $path |
||
| 69 | * |
||
| 70 | * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string |
||
| 71 | */ |
||
| 72 | 1 | public function vehicleLicense(string $path) |
|
| 76 | ]); |
||
| 77 | } |
||
| 79 |