original_string: 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,
          ]);
      }
code: 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,
          ]);
      }
code_tokens: 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 , ] ) ; }
docstring: 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
docstring_tokens: ID card OCR .