public function idCard(string $path, string $type = 'photo')
    {
        if (!\in_array($type, $this->allowTypes, true)) {
            throw new InvalidArgumentException(sprintf("Unsupported type: '%s'", $type));
        }

        return $this->httpGet('cv/ocr/idcard', [
            'type' => $type,
            'img_url' => $path,
        ]);
    }
public function idCard(string $path, string $type = 'photo')
    {
        if (!\in_array($type, $this->allowTypes, true)) {
            throw new InvalidArgumentException(sprintf("Unsupported type: '%s'", $type));
        }

        return $this->httpGet('cv/ocr/idcard', [
            'type' => $type,
            'img_url' => $path,
        ]);
    }
public function idCard ( string $ path , string $ type = 'photo' ) { if ( ! \ in_array ( $ type , $ this -> allowTypes , true ) ) { throw new InvalidArgumentException ( sprintf ( "Unsupported type: '%s'" , $ type ) ) ; } return $ this -> httpGet ( 'cv/ocr/idcard' , [ 'type' => $ type , 'img_url' => $ path , ] ) ; }
ID card OCR.

@param string $path
@param string $type

@return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string

@throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException
@throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
ID card OCR .