99namespace Justmd5 \TencentAi \Core ;
1010
1111use Hanson \Foundation \AbstractAPI ;
12+ use Justmd5 \TencentAi \Core \Traits \ArgumentProcessingTrait ;
1213use Justmd5 \TencentAi \Exception \IllegalParameterException ;
1314use Justmd5 \TencentAi \Exception \NotFoundException ;
1415use Overtrue \Validation \Factory as ValidatorFactory ;
1516use Overtrue \Validation \Translator ;
16- use Justmd5 \TencentAi \Core \Traits \ArgumentProcessingTrait ;
1717
1818class API extends AbstractAPI
1919{
@@ -43,13 +43,13 @@ public function __construct(Signature $signature, $classify, $filter)
4343 * 请求API.
4444 *
4545 * @param string $method
46- * @param array $params
47- * @param array $files
46+ * @param array $params
47+ * @param array $files
4848 *
49- * @return array
5049 * @throws IllegalParameterException
51- *
5250 * @throws NotFoundException
51+ *
52+ * @return array
5353 */
5454 public function request ($ method , $ params = [], $ files = [])
5555 {
@@ -63,7 +63,7 @@ public function request($method, $params = [], $files = [])
6363 throw new IllegalParameterException (sprintf ('参数错误:[%s] ' , json_encode ($ validator ->errors (), JSON_UNESCAPED_UNICODE )));
6464 }
6565 $ http = $ this ->getHttp ();
66- $ params= $ this ->processParams ($ this ->signature ,$ params );
66+ $ params = $ this ->processParams ($ this ->signature , $ params );
6767 $ response = $ files ? $ http ->upload ($ url , $ params , $ files ) : $ http ->post ($ url , $ params );
6868 $ result = json_decode (strval ($ response ->getBody ()), true );
6969 if (isset ($ result ['ret ' ])) {
0 commit comments